Skip to content

Commit 58144c2

Browse files
committed
fix test
There was a fragile string comparison of dictionaries, the order of items has changed: E - {'base.gpkg': {'geodiff_summary': [{'delete': 0, 'insert': 1, 'table': 'simple', 'update': 0}]}} E + {'base.gpkg': {'geodiff_summary': [{'table': 'simple', 'insert': 1, 'update': 0, 'delete': 0}]}}
1 parent 12c521f commit 58144c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mergin/test/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ def test_sync_diff(mc):
358358

359359

360360
def test_list_of_push_changes(mc):
361-
PUSH_CHANGES_SUMMARY = (
362-
"{'base.gpkg': {'geodiff_summary': [{'table': 'simple', 'insert': 1, 'update': 0, 'delete': 0}]}}"
363-
)
361+
PUSH_CHANGES_SUMMARY = {
362+
'base.gpkg': {'geodiff_summary': [{'table': 'simple', 'insert': 1, 'update': 0, 'delete': 0}]}
363+
}
364364

365365
test_project = "test_list_of_push_changes"
366366
project = API_USER + "/" + test_project
@@ -376,7 +376,7 @@ def test_list_of_push_changes(mc):
376376
shutil.copy(mp.fpath("inserted_1_A.gpkg"), mp.fpath(f_updated))
377377
mc._auth_session["expire"] = datetime.now().replace(tzinfo=pytz.utc) - timedelta(days=1)
378378
pull_changes, push_changes, push_changes_summary = mc.project_status(project_dir)
379-
assert str(push_changes_summary) == PUSH_CHANGES_SUMMARY
379+
assert push_changes_summary == PUSH_CHANGES_SUMMARY
380380

381381

382382
def test_token_renewal(mc):

0 commit comments

Comments
 (0)