From 7d55c3fe8553788e47759e7f643bfb56c75afc70 Mon Sep 17 00:00:00 2001 From: Hanno Schlichting Date: Thu, 22 Mar 2012 14:26:05 +0100 Subject: [PATCH] add tests for last_modified handling --- zktools/tests/test_node.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zktools/tests/test_node.py b/zktools/tests/test_node.py index 149f4ea..1fd22d8 100644 --- a/zktools/tests/test_node.py +++ b/zktools/tests/test_node.py @@ -27,13 +27,17 @@ def testUpdateValue(self): n2 = self.makeOne('/zkTestNode') eq_(n1.value, n2.value) + eq_(n1.last_modified, n2.last_modified) + old_modified = n1.last_modified n1.value = 942 # It can take a fraction of a second on some machines on occasion # for the other value to update time.sleep(0.1) eq_(n1.value, n2.value) + eq_(n1.last_modified, n2.last_modified) + self.assertTrue(n1.last_modified > old_modified) def testJsonValue(self): n1 = self.makeOne('/zkTestNode', use_json=True)