def test_getResultSetStorageKey_should_return_correct_key_for_generic_stores( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"store": "pokeystore"}) assert (result == "store_pokeystore")
def test_getStorageKey_should_call_getResultSetStorageKey_if_type_is_not_set(self): storage = VimeoStorage() storage._getResultSetStorageKey = Mock() result = storage.getStorageKey({"some_param": "param_value"}) storage._getResultSetStorageKey.assert_called_with({"some_param": "param_value"})
def test_getResultSetStorageKey_should_return_correct_key_for_show_scrapers( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"scraper": "show"}) assert (result == "s_show")
def test_getResultSetStorageKey_should_return_correct_key_for_stored_searches( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"api": "search"}) assert (result == "store_searches")
def test_getResultSetStorageKey_should_handle_external_correctly(self): storage = VimeoStorage() result = storage._getResultSetStorageKey( {"api": "my_playlists", "playlist": "some_playlist", "external": "true", "contact": "some_contact"} ) assert result.find("external") > 0
def test_getStorageKey_should_call_getResultSetStorageKey_if_type_is_not_set( self): storage = VimeoStorage() storage._getResultSetStorageKey = Mock() result = storage.getStorageKey({"some_param": "param_value"}) storage._getResultSetStorageKey.assert_called_with( {"some_param": "param_value"})
def test_getResultSetStorageKey_should_return_correct_key_for_subscription_path( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({ "api": "my_channels", "channel": "some_channel" }) assert (result == "result_my_channels_some_channel")
def test_getResultSetStorageKey_should_return_correct_key_for_playlist_path( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({ "api": "my_playlists", "playlist": "some_playlist" }) assert (result == "result_my_playlists_some_playlist")
def test_getResultSetStorageKey_should_return_correct_key_for_category_path( self): storage = VimeoStorage() result = storage._getResultSetStorageKey({ "scraper": "categories", "category": "some_category" }) assert (result == "s_categories_category_some_category")
def test_getResultSetStorageKey_should_handle_external_correctly(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({ "api": "my_playlists", "playlist": "some_playlist", "external": "true", "contact": "some_contact" }) assert (result.find("external") > 0)
def test_getResultSetStorageKey_should_return_correct_key_for_generic_stores(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"store": "pokeystore"}) assert result == "store_pokeystore"
def test_getResultSetStorageKey_should_return_correct_key_for_stored_searches(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"api": "search"}) assert result == "store_searches"
def test_getResultSetStorageKey_should_return_correct_key_for_subscription_path(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"api": "my_channels", "channel": "some_channel"}) assert result == "result_my_channels_some_channel"
def test_getResultSetStorageKey_should_return_correct_key_for_playlist_path(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"api": "my_playlists", "playlist": "some_playlist"}) assert result == "result_my_playlists_some_playlist"
def test_getResultSetStorageKey_should_return_correct_key_for_show_scrapers(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"scraper": "show"}) assert result == "s_show"
def test_getResultSetStorageKey_should_return_correct_key_for_category_path(self): storage = VimeoStorage() result = storage._getResultSetStorageKey({"scraper": "categories", "category": "some_category"}) assert result == "s_categories_category_some_category"