summaryrefslogtreecommitdiff
path: root/tests/test_stream_xep_0323.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_stream_xep_0323.py')
-rw-r--r--tests/test_stream_xep_0323.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/test_stream_xep_0323.py b/tests/test_stream_xep_0323.py
index b4c18afc..7c9cc7e8 100644
--- a/tests/test_stream_xep_0323.py
+++ b/tests/test_stream_xep_0323.py
@@ -456,7 +456,7 @@ class TestStreamSensorData(SlixTest):
</iq>
""")
- self.failUnless(results == ["rejected"],
+ self.assertTrue(results == ["rejected"],
"Rejected callback was not properly executed")
def testRequestAcceptedAPI(self):
@@ -493,7 +493,7 @@ class TestStreamSensorData(SlixTest):
</iq>
""")
- self.failUnless(results == ["accepted"],
+ self.assertTrue(results == ["accepted"],
"Accepted callback was not properly executed")
def testRequestFieldsAPI(self):
@@ -561,19 +561,19 @@ class TestStreamSensorData(SlixTest):
</message>
""")
- self.failUnlessEqual(results, ["accepted","fields","done"])
+ self.assertEqual(results, ["accepted","fields","done"])
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.failUnlessEqual(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.failUnlessEqual(callback_data["timestamp"], "2000-01-01T00:01:02")
+ self.assertEqual(callback_data["timestamp"], "2000-01-01T00:01:02")
#self.assertIn("field_Voltage", callback_data);
self.assertTrue("field_Voltage" in callback_data)
- self.failUnlessEqual(callback_data["field_Voltage"], {"name": "Voltage", "value": "230.4", "typename": "numeric", "unit": "V", "flags": {"invoiced": "true"}})
+ self.assertEqual(callback_data["field_Voltage"], {"name": "Voltage", "value": "230.4", "typename": "numeric", "unit": "V", "flags": {"invoiced": "true"}})
#self.assertIn("field_TestBool", callback_data);
self.assertTrue("field_TestBool" in callback_data)
- self.failUnlessEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" })
+ self.assertEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" })
def testServiceDiscoveryClient(self):
self.stream_start(mode='client',
@@ -675,16 +675,16 @@ class TestStreamSensorData(SlixTest):
</message>
""")
- self.failUnlessEqual(results, ["accepted","failure"]);
+ self.assertEqual(results, ["accepted","failure"]);
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.failUnlessEqual(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.failUnlessEqual(callback_data["timestamp"], "2013-03-07T17:13:30")
+ self.assertEqual(callback_data["timestamp"], "2013-03-07T17:13:30")
# self.assertIn("error_msg", callback_data);
self.assertTrue("error_msg" in callback_data)
- self.failUnlessEqual(callback_data["error_msg"], "Timeout.")
+ self.assertEqual(callback_data["error_msg"], "Timeout.")
def testDelayedRequest(self):
self.stream_start(mode='component',
@@ -1071,19 +1071,19 @@ class TestStreamSensorData(SlixTest):
</message>
""")
- self.failUnlessEqual(results, ["queued","started","fields","done"]);
+ self.assertEqual(results, ["queued","started","fields","done"]);
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.failUnlessEqual(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.failUnlessEqual(callback_data["timestamp"], "2000-01-01T00:01:02")
+ self.assertEqual(callback_data["timestamp"], "2000-01-01T00:01:02")
# self.assertIn("field_Voltage", callback_data);
self.assertTrue("field_Voltage" in callback_data)
- self.failUnlessEqual(callback_data["field_Voltage"], {"name": "Voltage", "value": "230.4", "typename": "numeric", "unit": "V", "flags": {"invoiced": "true"}})
+ self.assertEqual(callback_data["field_Voltage"], {"name": "Voltage", "value": "230.4", "typename": "numeric", "unit": "V", "flags": {"invoiced": "true"}})
# self.assertIn("field_TestBool", callback_data);
self.assertTrue("field_TestBool" in callback_data)
- self.failUnlessEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" })
+ self.assertEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" })
def testRequestFieldsCancelAPI(self):
@@ -1139,7 +1139,7 @@ class TestStreamSensorData(SlixTest):
</iq>
""")
- self.failUnlessEqual(results, ["accepted","cancelled"])
+ self.assertEqual(results, ["accepted","cancelled"])
def testDelayedRequestCancel(self):
self.stream_start(mode='component',