summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJosh Blum2013-03-29 01:54:52 -0700
committerJosh Blum2013-03-29 01:54:52 -0700
commitcb93ca52e8768a8b53ff5576c41b29a3144793f1 (patch)
treef2121cd8d0b0a276efc749cb79e213eb1eb34617 /tests
parente78ac3e9582f46670a904f119d2ee80d7310b42e (diff)
downloadsandhi-cb93ca52e8768a8b53ff5576c41b29a3144793f1.tar.gz
sandhi-cb93ca52e8768a8b53ff5576c41b29a3144793f1.tar.bz2
sandhi-cb93ca52e8768a8b53ff5576c41b29a3144793f1.zip
gras: fixed query unit test, added json check
Diffstat (limited to 'tests')
-rw-r--r--tests/query_test.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/query_test.py b/tests/query_test.py
index 0326d33..e93b5d6 100644
--- a/tests/query_test.py
+++ b/tests/query_test.py
@@ -4,6 +4,7 @@ import unittest
import gras
import numpy
from demo_blocks import *
+import json
class QueryTest(unittest.TestCase):
@@ -22,7 +23,13 @@ class QueryTest(unittest.TestCase):
self.assertEqual(vec_sink.get_vector(), (0, 9, 8, 7, 6))
- print self.tb.query("")
+ blocks_json = self.tb.query("<args><path>/blocks.json</path></args>")
+ print blocks_json
+ json.loads(blocks_json)
+
+ stats_json = self.tb.query("<args><path>/stats.json</path></args>")
+ print stats_json
+ json.loads(stats_json)
if __name__ == '__main__':
unittest.main()