From e24e4d7dfe648e33988366cb1f615c2a443f5156 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 2 Jun 2013 10:50:46 -0700 Subject: props: began filling in pmc to/from ptree --- tests/query_test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/query_test.py') 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() -- cgit