def test_blob_available_after_delete_and_restore(): registry_state = RegistryState() registry_state.dispatch_entries([ [ 1, { "type": RegistryActions.BLOB_MOUNTED, "repository": "alpine", "hash": "abcdefgh", }, ], [ 1, { "type": RegistryActions.BLOB_UNMOUNTED, "repository": "alpine", "hash": "abcdefgh", }, ], [ 1, { "type": RegistryActions.BLOB_MOUNTED, "repository": "alpine", "hash": "abcdefgh", }, ], ]) assert registry_state.is_blob_available("alpine", "abcdefgh")
def test_blob_not_available_initially(): registry_state = RegistryState() assert not registry_state.is_blob_available("alpine", "abcdefgh")