def test_enum_as_game(self): """Test that we can pass values from the Games enum to the get_url function""" game = steam_market.Games.TF2 item = '' url = steam_market.get_url(game=game, item=item) self.assertEqual('http://steamcommunity.com/market/listings/440/', url)
def test_url_with_non_ascii_characters(self): """Test that we correctly convert non ascii characters""" game = 440 item = 'Killstreak Claidheamh Mòr Kit' url = steam_market.get_url(game=game, item=item) self.assertEqual('http://steamcommunity.com/market/listings/440/Killstreak%20Claidheamh%20M%C3%B2r%20Kit', url)
def test_enum_as_game(self): """Test that we can pass values from the Games enum to the get_url function""" game = steam_market.Games.TF2 item = "" url = steam_market.get_url(game=game, item=item) self.assertEqual("http://steamcommunity.com/market/listings/440/", url)
def test_url_with_non_ascii_characters(self): """Test that we correctly convert non ascii characters""" game = 440 item = "Killstreak Claidheamh Mòr Kit" url = steam_market.get_url(game=game, item=item) self.assertEqual("http://steamcommunity.com/market/listings/440/Killstreak%20Claidheamh%20M%C3%B2r%20Kit", url)
def test_filter(self): """Test that we correctly add filters""" game = 440 item = 'Professional Killstreak Phlogistinator Kit' filter_criteria = 'Deadly Daffodil' url = steam_market.get_url(game=game, item=item, filter_criteria=filter_criteria) self.assertEqual('http://steamcommunity.com/market/listings/440/Professional%20Killstreak%20Phlogistinator%20Kit?filter=Deadly%20Daffodil', url)
def test_filter(self): """Test that we correctly add filters""" game = 440 item = "Professional Killstreak Phlogistinator Kit" filter_criteria = "Deadly Daffodil" url = steam_market.get_url(game=game, item=item, filter_criteria=filter_criteria) self.assertEqual( "http://steamcommunity.com/market/listings/440/Professional%20Killstreak%20Phlogistinator%20Kit?filter=Deadly%20Daffodil", url, )