There's a couple of minor tweaks to the API implementation required to get unit tests to pass. These are grouped here instead of as separate tickets because it seems that each is a really minor tweak.
To exercise the tests, pull the code, cd to gw_test and "python gateway_api_test.py"
Test results here:
python gateway_api_test.py
DEBUG:root:getfieldinfo url = http://coreyosandbox.appspot.com/gateway/fields/id
FDEBUG:root:getfieldvalues url = http://coreyosandbox.appspot.com/gateway/fields/genus_s/values
.DEBUG:root:getfields url = http://coreyosandbox.appspot.com/gateway/fields
.DEBUG:root:get records url = http://coreyosandbox.appspot.com/gateway/records?count=10&start=0&filter=%2A%3A%2A&fields=id%2Cgenus_s
FDEBUG:root:get record url = http://coreyosandbox.appspot.com/gateway/record/UAM.Fish.3368.
F.
======================================================================
FAIL: testGetFieldInfo (__main__.TestGatewayApi)
----------------------------------------------------------------------
Traceback (most recent call last):
File "gateway_api_test.py", line 72, in testGetFieldInfo
self.assertTrue(field.has_key('stored'))
AssertionError
======================================================================
FAIL: testGetRecods (__main__.TestGatewayApi)
----------------------------------------------------------------------
Traceback (most recent call last):
File "gateway_api_test.py", line 97, in testGetRecods
self.assertEqual(response.getcode(), 200)
AssertionError: 500 != 200
======================================================================
FAIL: testGetRecord (__main__.TestGatewayApi)
----------------------------------------------------------------------
Traceback (most recent call last):
File "gateway_api_test.py", line 113, in testGetRecord
self.assertEqual(response.getcode(), 200)
AssertionError: 404 != 200
----------------------------------------------------------------------
Ran 6 tests in 2.710s
FAILED (failures=3)
There's a couple of minor tweaks to the API implementation required to get unit tests to pass. These are grouped here instead of as separate tickets because it seems that each is a really minor tweak.
To exercise the tests, pull the code, cd to gw_test and "python gateway_api_test.py"
Test results here: