summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Klien <flowolf@klienux.org>2018-10-10 14:12:34 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-10-15 14:59:23 +0200
commit897610d819425a84a232e26f239482b66a09dd8b (patch)
tree5beb10894950137550d9f13e6d6e32cf79edf44d /tests
parentd33366badde6a2d51be8d731834540c03b9a6c49 (diff)
downloadslixmpp-897610d819425a84a232e26f239482b66a09dd8b.tar.gz
slixmpp-897610d819425a84a232e26f239482b66a09dd8b.tar.bz2
slixmpp-897610d819425a84a232e26f239482b66a09dd8b.tar.xz
slixmpp-897610d819425a84a232e26f239482b66a09dd8b.zip
fix: failUnlessEqual -> assertEqual
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_xep_0323.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/test_stream_xep_0323.py b/tests/test_stream_xep_0323.py
index a3c7b460..7c9cc7e8 100644
--- a/tests/test_stream_xep_0323.py
+++ b/tests/test_stream_xep_0323.py
@@ -561,19 +561,19 @@ class TestStreamSensorData(SlixTest):
</message>
""")
- self.assertTrue(results, ["accepted","fields","done"])
+ self.assertEqual(results, ["accepted","fields","done"])
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.assertTrue(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.assertTrue(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.assertTrue(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.assertTrue(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.assertTrue(results, ["accepted","failure"]);
+ self.assertEqual(results, ["accepted","failure"]);
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.assertTrue(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.assertTrue(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.assertTrue(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.assertTrue(results, ["queued","started","fields","done"]);
+ self.assertEqual(results, ["queued","started","fields","done"]);
# self.assertIn("nodeId", callback_data);
self.assertTrue("nodeId" in callback_data)
- self.assertTrue(callback_data["nodeId"], "Device33")
+ self.assertEqual(callback_data["nodeId"], "Device33")
# self.assertIn("timestamp", callback_data);
self.assertTrue("timestamp" in callback_data)
- self.assertTrue(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.assertTrue(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.assertTrue(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.assertTrue(results, ["accepted","cancelled"])
+ self.assertEqual(results, ["accepted","cancelled"])
def testDelayedRequestCancel(self):
self.stream_start(mode='component',