BigW Consortium Gitlab

Commit 87f35cf0 by Dan McKinley

removing v1 code, fixing core tests

parent 8fd2eff2
from _v1 import EtsyV1, EtsyV1
from _v2 import EtsyV2 as Etsy
from etsy_env import EtsyEnvSandbox, EtsyEnvProduction
......
from __future__ import with_statement
from _core import API
class EtsyV1(API):
api_url = 'http://beta-api.etsy.com/v1'
api_version = 'v1'
......@@ -40,7 +40,7 @@ class MockAPI(API):
'description': 'no pos arguments'}]
def _get_url(self, url):
def _get_url(self, url, http_method, content_type, body):
return '{ "count": 1, "results": [3] }'
......
from __future__ import with_statement
from unittest import TestCase
from etsy import EtsyV1 as Etsy
class V1Tests(TestCase):
def test_v1_api_works(self):
api = Etsy()
x = api.getUserDetails(user_id='mcfunley')
self.assertEqual(x[0]['user_name'], 'mcfunley')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment