Changeset View
Changeset View
Standalone View
Standalone View
swh/storage/tests/test_postgresql.py
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | def test_skipped_content_add_db(self, swh_storage, sample_data): | ||||
"absent", | "absent", | ||||
"Content too long", | "Content too long", | ||||
) | ) | ||||
def test_clear_buffers(self, swh_storage): | def test_clear_buffers(self, swh_storage): | ||||
"""Calling clear buffers on real storage does nothing | """Calling clear buffers on real storage does nothing | ||||
""" | """ | ||||
assert swh_storage.clear_buffers() is None | assert swh_storage.clear_buffers([]) is None | ||||
def test_flush(self, swh_storage): | def test_flush(self, swh_storage): | ||||
"""Calling clear buffers on real storage does nothing | """Calling clear buffers on real storage does nothing | ||||
""" | """ | ||||
assert swh_storage.flush() == {} | assert swh_storage.flush([]) == {} | ||||
def test_dbversion(self, swh_storage): | def test_dbversion(self, swh_storage): | ||||
with swh_storage.db() as db: | with swh_storage.db() as db: | ||||
assert db.check_dbversion() | assert db.check_dbversion() | ||||
def test_dbversion_mismatch(self, swh_storage, monkeypatch): | def test_dbversion_mismatch(self, swh_storage, monkeypatch): | ||||
monkeypatch.setattr(Db, "current_version", -1) | monkeypatch.setattr(Db, "current_version", -1) | ||||
with swh_storage.db() as db: | with swh_storage.db() as db: | ||||
Show All 10 Lines |