Skip to content

Commit

Permalink
remove tests as flush_to_storage and on_stop are no longer implemente…
Browse files Browse the repository at this point in the history
…d on ChangeloggedObjectManager
  • Loading branch information
Richard Hundt committed Jun 19, 2023
1 parent 10e71e6 commit 3c62396
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion faust/tables/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class ChangeloggedObjectManager(Store):
data: MutableMapping

_storage: Optional[StoreT] = None
_dirty: Set

def __init__(self, table: Table, **kwargs: Any) -> None:
self.table = table
Expand Down
14 changes: 0 additions & 14 deletions tests/unit/tables/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ async def test_on_start(self, *, man):
await man.on_start()
man.add_runtime_dependency.assert_called_once_with(man.storage)

@pytest.mark.asyncio
async def test_on_stop(self, *, man):
man.flush_to_storage = Mock()
await man.on_stop()
man.flush_to_storage.assert_called_once_with()

def test_persisted_offset(self, *, man, storage):
ret = man.persisted_offset(TP1)
storage.persisted_offset.assert_called_once_with(TP1)
Expand Down Expand Up @@ -135,14 +129,6 @@ def test_sync_from_storage(self, *, man, storage):
assert 1 in man["foo"].synced
assert 2 in man["bar"].synced

def test_flush_to_storage(self, *, man):
man._storage = {}
man._dirty = {"foo", "bar"}
assert man["foo"]
assert man["bar"]
man.flush_to_storage()
assert man._storage["foo"] == "foo-stored"

def test_reset_state(self, *, man, storage):
man.reset_state()
storage.reset_state.assert_called_once_with()
Expand Down

0 comments on commit 3c62396

Please sign in to comment.