import unittest
import json

from indra_db_api import api

class DbApiTestCase(unittest.TestCase):

    def setUp(self):
        api.app.testing = True
        self.app = api.app.test_client()

    def tearDown(self):
        pass

    def test_blank_response(self):
        """Test the response to an empty request."""
        resp = self.app.get('/statements')
        assert resp.status_code == 400, 'Got response with no input.'

    def test_specific_query(self):
        """Test whether we can get a "fully" specified statement."""
        data = json.dumps(dict(object='MAP2K1', subject='MAPK1',
                               action='Phosphorylation'))
        resp = self.app.get('/statements', data=data,
                            content_type='application/json')
        assert resp.status_code == 200, \
            'Got error code %d.' % resp.status_code
        assert len(json.loads(resp.data.decode())) is not 0, \
            'Did not get any statements.'

if __name__ == '__main__':
    unittest.main()
@@ -329,34 +329,35 @@
 resp = self.app.
-ge
+pos
 t('/statements')
@@ -402,16 +402,22 @@
 0, 'Got 
+clean 
 response
@@ -685,18 +685,19 @@
 elf.app.
-ge
+pos
 t('/stat

Update tests.