File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/save_and_restore_api/tools Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def ROOT_NODE_UID(self):
2929
3030 def open (self ):
3131 auth = httpx .BasicAuth (username = self ._username , password = self ._password )
32- self ._client = httpx .Client (base_url = BASE_URL , timeout = timeout , auth = auth )
32+ self ._client = httpx .Client (base_url = self . _base_url , timeout = timeout , auth = auth )
3333
3434 def close (self ):
3535 self ._client .close ()
Original file line number Diff line number Diff line change 33import importlib .metadata
44
55import save_and_restore_api as m
6+ from save_and_restore_api .tools .upload import SaveRestoreAPI
67
78
89def test_version ():
@@ -11,3 +12,14 @@ def test_version():
1112
1213def test_import ():
1314 from save_and_restore_api .tools .upload import SaveRestoreAPI # noqa: F401
15+
16+
17+ def test_comm ():
18+ SR = SaveRestoreAPI (base_url = "http://localhost:8080/save-restore" , timeout = 2 )
19+ # SR.set_username_password(username="johndoe", password="1234")
20+ SR .set_username_password (username = "user" , password = "userPass" )
21+ # SR.set_username_password(username="admin", password="adminPass")
22+ SR .open ()
23+ SR .login ()
24+ SR .get_node (SR .ROOT_NODE_UID )
25+ SR .close ()
You can’t perform that action at this time.
0 commit comments