How to use the steampy.models.GameOptions function in steampy

To help you get started, we’ve selected a few steampy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bukson / steampy / test / test_client.py View on Github external
def test_send_offer_without_sessionid_cookie(self):
        client = SteamClient(self.credentials.api_key)
        client.login(self.credentials.login, self.credentials.password, self.steam_guard_file)
        client._session.cookies.set('sessionid', None, domain="steamcommunity.com")
        cookies = client._session.cookies.get_dict('steamcommunity.com')
        self.assertFalse('sessionid' in cookies)
        game = GameOptions.TF2
        asset_id = ''
        my_asset = Asset(asset_id, game)
        trade_offer_url = ''
        make_offer = lambda: client.make_offer_with_url([my_asset], [], trade_offer_url, "TEST")
        self.assertRaises(AttributeError, make_offer)
github bukson / steampy / test / test_market.py View on Github external
def test_get_price_history(self):
        with SteamClient(self.credentials.api_key, self.credentials.login,
                         self.credentials.password, self.steam_guard_file) as client:
            item = 'M4A1-S | Cyrex (Factory New)'
            response = client.market.fetch_price_history(item, GameOptions.CS)
            self.assertTrue(response['success'])
            self.assertIn('prices', response)
github bukson / steampy / test / test_client.py View on Github external
def test_get_partner_inventory(self):
        client = SteamClient(self.credentials.api_key)
        client.login(self.credentials.login, self.credentials.password, self.steam_guard_file)
        partner_id = ''
        game = GameOptions.TF2
        inventory = client.get_partner_inventory(partner_id, game)
        self.assertIsNotNone(inventory)