コード例 #1
0
ファイル: test_coupon.py プロジェクト: lotrekagency/pywoo
    def test_api_get(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_coupons()
        assert all(type(x) == Coupon for x in obj)

        obj = api.get_coupons(id='112')
        assert type(obj) == Coupon and obj.id == 112
コード例 #2
0
ファイル: test_coupon.py プロジェクト: lotrekagency/pywoo
    def test_object_refresh(self, func):
        api = Api('', 'fake_consumer_key', 'fake_consumer_secret')

        obj = api.get_coupons(id='112')
        assert type(obj) == Coupon and obj.id == 112

        obj.refresh()
        assert type(obj) == Coupon and obj.id == 112