Skip to content
Snippets Groups Projects
Commit 9a2a8a5c authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Merge in path-changing API

parent d2ea41f9
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,8 @@ def list_session_paths():
def change_path(key, path):
try:
if session.get_paths()[key] == path:
return session.get_paths()
session.set_data_directory(key, path)
except InvalidPathError as e:
raise HTTPException(
......
......@@ -155,4 +155,20 @@ class TestApiFromAutomatedClient(TestServerBaseClass):
resp_check = requests.get(
self.uri + 'paths'
)
self.assertEqual(resp_inpath.json()['inbound_images'], resp_check.json()['inbound_images'])
\ No newline at end of file
self.assertEqual(resp_inpath.json()['outbound_images'], resp_check.json()['outbound_images'])
def test_no_change_inbound_path(self):
resp_inpath = requests.get(
self.uri + 'paths'
)
resp_change = requests.put(
self.uri + f'paths/watch_output',
params={
'path': resp_inpath.json()['outbound_images']
}
)
self.assertEqual(resp_change.status_code, 200)
resp_check = requests.get(
self.uri + 'paths'
)
self.assertEqual(resp_inpath.json()['outbound_images'], resp_check.json()['outbound_images'])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment