Skip to content

Commit

Permalink
test: Change call counts with model back as default.
Browse files Browse the repository at this point in the history
We don't call the modulestore or update the cache here now that we are
backed by the database model.  Previously the cache would change because
the `_encode_root_cache_key` function in `BlockStructureStore` class
used the `BlockstoreBlockData.VERSION` as a part of the cache key when
the data was not being cached in a DB model.
  • Loading branch information
feanil committed Jul 29, 2024
1 parent 318f55a commit 092f565
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ def test_get_collected_transformer_version(self):
def test_get_collected_structure_version(self):
self.collect_and_verify(expect_modulestore_called=True, expect_cache_updated=True)
BlockStructureBlockData.VERSION += 1
self.collect_and_verify(expect_modulestore_called=True, expect_cache_updated=True)
assert TestTransformer1.collect_call_count == 2
self.collect_and_verify(expect_modulestore_called=False, expect_cache_updated=False)
assert TestTransformer1.collect_call_count == 1

def test_clear(self):
self.collect_and_verify(expect_modulestore_called=True, expect_cache_updated=True)
Expand Down

0 comments on commit 092f565

Please sign in to comment.