Skip to content

Commit 7d15a6b

Browse files
committed
Close connection to make runnable test in new python and skip test for chunks cache on v1 supported server
1 parent b6cfa3e commit 7d15a6b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mergin/test/test_client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,7 @@ def _create_test_table(db_file):
13641364
cursor.execute("CREATE TABLE test (fid SERIAL, txt TEXT);")
13651365
cursor.execute("INSERT INTO test VALUES (123, 'hello');")
13661366
cursor.execute("COMMIT;")
1367+
con.close()
13671368

13681369

13691370
def _create_spatial_table(db_file):
@@ -3069,6 +3070,8 @@ def test_validate_auth(mc: MerginClient):
30693070
def test_uploaded_chunks_cache(mc):
30703071
"""Create a new project, download it, add a file and then do sync - it should not fail"""
30713072

3073+
if not mc.server_features().get("v2_push_enabled"):
3074+
pytest.skip("Server does not support v2 push")
30723075
test_project = "test_uploaded_chunks_cache"
30733076
project = API_USER + "/" + test_project
30743077
project_dir = os.path.join(TMP_DIR, test_project) # primary project dir for updates

0 commit comments

Comments
 (0)