summaryrefslogtreecommitdiff
path: root/tests/query_test.py
diff options
context:
space:
mode:
authorJosh Blum2013-06-02 10:50:46 -0700
committerJosh Blum2013-06-02 10:50:46 -0700
commite24e4d7dfe648e33988366cb1f615c2a443f5156 (patch)
tree66137dc9be472b0e26a7fbcbe56068a7d85242c7 /tests/query_test.py
parentab1f7e5871d9323242e9b3d21e2f7811f1567c43 (diff)
downloadsandhi-e24e4d7dfe648e33988366cb1f615c2a443f5156.tar.gz
sandhi-e24e4d7dfe648e33988366cb1f615c2a443f5156.tar.bz2
sandhi-e24e4d7dfe648e33988366cb1f615c2a443f5156.zip
props: began filling in pmc to/from ptree
Diffstat (limited to 'tests/query_test.py')
-rw-r--r--tests/query_test.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/query_test.py b/tests/query_test.py
index 3cbe648..a61d4db 100644
--- a/tests/query_test.py
+++ b/tests/query_test.py
@@ -75,8 +75,24 @@ class QueryTest(unittest.TestCase):
self.assertTrue('my_block_uid' in blocks_result['blocks'])
#set the property
+ self.tb.query(dict(
+ path="/props.json",
+ block='my_block_uid',
+ key='foo',
+ action='set',
+ value=42,
+ ))
+ self.assertEqual(block.foo, 42)
#get the property
+ block.set('foo', 21)
+ result = self.tb.query(dict(
+ path="/props.json",
+ block='my_block_uid',
+ key='foo',
+ action='get'
+ ))
+ self.assertEqual(result['value'], 21)
if __name__ == '__main__':
unittest.main()