Skip to content

Commit 43d50a5

Browse files
committed
Test fixes
1 parent 7175d70 commit 43d50a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_database.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,11 @@ async def test_replication(db, bad_db, cluster):
203203
await bad_db.replication.inventory("id")
204204
with pytest.raises(ReplicationDumpError):
205205
await bad_db.replication.dump("test_collection")
206-
with pytest.raises(ReplicationClusterInventoryError):
207-
await bad_db.replication.cluster_inventory()
208-
result = await db.replication.cluster_inventory()
209-
assert isinstance(result, dict)
206+
if cluster:
207+
with pytest.raises(ReplicationClusterInventoryError):
208+
await bad_db.replication.cluster_inventory()
209+
result = await db.replication.cluster_inventory()
210+
assert isinstance(result, dict)
210211
if not cluster:
211212
with pytest.raises(ReplicationLoggerStateError):
212213
await bad_db.replication.logger_state()

0 commit comments

Comments
 (0)