예제 #1
0
    def test_api_get(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_tax_rates()
        assert all(type(x) == TaxRate for x in obj)

        obj = api.get_tax_rates(id='2')
        assert type(obj) == TaxRate and obj.id == 2
예제 #2
0
    def test_object_refresh(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_tax_rates(id='2')
        assert type(obj) == TaxRate and obj.id == 2

        obj.refresh()
        assert type(obj) == TaxRate and obj.id == 2