コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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)
コード例 #4
0
    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)
コード例 #5
0
    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)
コード例 #6
0
    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,
        )