Skip to content

Commit cb3206c

Browse files
varmar05wonder-sk
authored andcommitted
Fix errors in tests
1 parent 2af9b83 commit cb3206c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

mergin/test/test_client.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ def test_sync_diff(mc, push_geodiff_enabled, pull_geodiff_enabled):
329329
toggle_geodiff(True)
330330

331331

332-
@pytest.mark.skip(reason="currently fails on test.dev instance due to server bug")
333332
def test_list_of_push_changes(mc):
334333
PUSH_CHANGES_SUMMARY = "{'base.gpkg': {'geodiff_summary': [{'table': 'gpkg_contents', 'insert': 0, 'update': 1, 'delete': 0}, {'table': 'simple', 'insert': 1, 'update': 0, 'delete': 0}]}}"
335334

@@ -352,7 +351,7 @@ def test_list_of_push_changes(mc):
352351

353352
mc._auth_session["expire"] = datetime.now().replace(tzinfo=pytz.utc) - timedelta(days=1)
354353
mc._auth_params = None
355-
with pytest.raises(ClientError, match="You don't have the permission to access the requested resource. It is either read-protected or not readable by the server."):
354+
with pytest.raises(ClientError, match="You do not have permissions for this project"):
356355
mc.project_status(project_dir)
357356

358357

@@ -565,8 +564,8 @@ def test_available_storage_validation(mc):
565564

566565
# Expecting empty project
567566
project_info = get_project_info(mc, API_USER, test_project)
568-
assert project_info['meta']['files_count'] == 0
569-
assert project_info['meta']['size'] == 0
567+
assert project_info['version'] == 'v0'
568+
assert project_info['disk_usage'] == 0
570569

571570

572571
def test_available_storage_validation2(mc, mc2):
@@ -614,9 +613,9 @@ def test_available_storage_validation2(mc, mc2):
614613
mc.push_project(project_dir)
615614

616615
# Check project content
617-
project_info = get_project_info(mc2, API_USER2, test_project)
618-
assert project_info['meta']['files_count'] == 1
619-
assert project_info['meta']['size'] == file_size
616+
project_info = mc.project_info(test_project_fullname)
617+
assert len(project_info["files"]) == 1
618+
assert project_info["disk_usage"] == file_size
620619

621620
# remove dummy big file from a disk
622621
remove_folders([project_dir])

0 commit comments

Comments
 (0)