Commit 35ba7aa6 by Clinton Blackburn

Added API date format to Client

parent 55b73d84
......@@ -21,6 +21,9 @@ class Client(object):
way to get access to those classes and their methods.
"""
# Date format to be used when sending and parsing data from the API
DATE_FORMAT = '%Y-%m-%d'
def __init__(self, base_url, auth_token=None, timeout=0.25):
"""
Initialize the client.
......
......@@ -22,6 +22,10 @@ class ClientTests(ClientTestCase):
httpretty.disable()
httpretty.reset()
def test_date_format(self):
self.assertEqual(Client.DATE_FORMAT, '%Y-%m-%d')
self.assertEqual(Client('').DATE_FORMAT, '%Y-%m-%d')
def test_has_resource(self):
httpretty.register_uri(httpretty.GET, self.test_url, body='')
self.assertEquals(self.client.has_resource(self.test_endpoint), True)
......
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