def test_api_get(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_shipping_methods()
        assert all(type(x) == ShippingMethod for x in obj)

        obj = api.get_shipping_methods(id='flat_rate')
        assert type(obj) == ShippingMethod and obj.id == 'flat_rate'
    def test_object_refresh(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_shipping_methods(id='flat_rate')
        assert type(obj) == ShippingMethod and obj.id == 'flat_rate'

        obj.refresh()
        assert type(obj) == ShippingMethod and obj.id == 'flat_rate'