Skip to content

Commit 84ca917

Browse files
committed
add test
1 parent e4e52d6 commit 84ca917

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

mergin/test/test_client.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2871,3 +2871,18 @@ def server_config(self):
28712871

28722872
with pytest.raises(ClientError, match="The requested URL was not found on the server"):
28732873
mc.send_logs(logs_path)
2874+
2875+
2876+
def test_mc_without_login():
2877+
2878+
# client without login should be able to access server config
2879+
mc = MerginClient(SERVER_URL)
2880+
config = mc.server_config()
2881+
assert config
2882+
assert isinstance(config, dict)
2883+
assert "server_configured" in config
2884+
assert config["server_configured"]
2885+
2886+
# without login should not be able to access workspaces
2887+
with pytest.raises(ClientError, match="The requested URL was not found on the server"):
2888+
mc.workspaces_list()

0 commit comments

Comments
 (0)