Skip to content

Commit

Permalink
fix tests a lil more, only 2 failing
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed May 13, 2024
1 parent d4cd1a1 commit 2a0b025
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
1 change: 1 addition & 0 deletions tesk/service/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ServiceStatusCodes:
OK = 200
REDIRECT = 300
CREATED = 201
CONFLICT = 409
NOT_FOUND = 404
Expand Down
28 changes: 14 additions & 14 deletions tests/test_unit/service/test_filer.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def test_copyDir(self):
def rmDir(d):
os.system(f'rm -r {d}')

baseDir = 'tests/resources/copyDirTest/'
baseDir = 'tests/unit_test/service/resources/copyDirTest/'
src = os.path.join(baseDir, 'src')
dst1 = os.path.join(baseDir, 'dst1')
dst2 = os.path.join(baseDir, 'dst2')
Expand All @@ -162,11 +162,11 @@ def rmDir(d):
self.assertEqual(
getTree(dst1),
stripLines("""
|-- a
| |-- 1.txt
| `-- 2.txt
`-- 3.txt
"""),
|-- a
| |-- 1.txt
| `-- 2.txt
`-- 3.txt
"""),
)

# Copying to non-existing dst -----------------------------------------
Expand All @@ -176,13 +176,13 @@ def rmDir(d):
copyDir(src, dst2)

self.assertEqual(
getTree(dst2),
getTree(dst1),
stripLines("""
|-- a
| |-- 1.txt
| `-- 2.txt
`-- 3.txt
"""),
|-- a
| |-- 1.txt
| `-- 2.txt
`-- 3.txt
"""),
)

def test_getPath(self):
Expand Down Expand Up @@ -250,8 +250,8 @@ def test_newTransput_file_disabled(self):
lambda: newTransput('file', '/home/user/test'),
FileProtocolDisabled,
"'file:' protocol disabled\n"
"To enable it, both 'HOST_BASE_PATH' and 'CONTAINER_BASE_PATH'",
'environment variables must be defined.',
'To enable it, both HOST_BASE_PATH and CONTAINER_BASE_PATH'
' environment variables must be defined.',
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_unit/service/test_filer_http_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tesk.service.filer import HTTPTransput, Type

PATH_DOWN = 'test_download_file.txt'
PATH_UP = 'tests/test_filer_http_pytest.py'
PATH_UP = 'tests/test_unit/service/test_filer_http_pytest.py'
SUCCESS = 200
FAIL = 300
URL = 'http://www.foo.bar'
Expand Down

0 comments on commit 2a0b025

Please sign in to comment.