summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2014-02-06 09:54:45 -0800
committerLance Stout <lancestout@gmail.com>2014-02-06 09:54:45 -0800
commita2423b849963887415b5b86e556ccda5f9ac2913 (patch)
treec0f0147093b8637fcd12b4f8f065c8d9a8e2aaf0 /tests
parent49acdac7765498f11b79dd826742ce8570aae5d2 (diff)
downloadslixmpp-a2423b849963887415b5b86e556ccda5f9ac2913.tar.gz
slixmpp-a2423b849963887415b5b86e556ccda5f9ac2913.tar.bz2
slixmpp-a2423b849963887415b5b86e556ccda5f9ac2913.tar.xz
slixmpp-a2423b849963887415b5b86e556ccda5f9ac2913.zip
Get the IoT plugins to pass tests on Py3sleek-1.2.01.2.0
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stream_xep_0323.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_stream_xep_0323.py b/tests/test_stream_xep_0323.py
index b10f0b0d..fd2ad225 100644
--- a/tests/test_stream_xep_0323.py
+++ b/tests/test_stream_xep_0323.py
@@ -572,16 +572,16 @@ class TestStreamSensorData(SleekTest):
self.failUnlessEqual(results, ["accepted","fields","done"]);
# self.assertIn("nodeId", callback_data);
- self.assertTrue(callback_data.has_key("nodeId"));
+ self.assertTrue("nodeId" in callback_data)
self.failUnlessEqual(callback_data["nodeId"], "Device33");
# self.assertIn("timestamp", callback_data);
- self.assertTrue(callback_data.has_key("timestamp"));
+ self.assertTrue("timestamp" in callback_data);
self.failUnlessEqual(callback_data["timestamp"], "2000-01-01T00:01:02");
#self.assertIn("field_Voltage", callback_data);
- self.assertTrue(callback_data.has_key("field_Voltage"));
+ 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.assertIn("field_TestBool", callback_data);
- self.assertTrue(callback_data.has_key("field_TestBool"));
+ self.assertTrue("field_TestBool" in callback_data);
self.failUnlessEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" });
def testServiceDiscoveryClient(self):
@@ -693,13 +693,13 @@ class TestStreamSensorData(SleekTest):
self.failUnlessEqual(results, ["accepted","failure"]);
# self.assertIn("nodeId", callback_data);
- self.assertTrue(callback_data.has_key("nodeId"));
+ self.assertTrue("nodeId" in callback_data);
self.failUnlessEqual(callback_data["nodeId"], "Device33");
# self.assertIn("timestamp", callback_data);
- self.assertTrue(callback_data.has_key("timestamp"));
+ self.assertTrue("timestamp" in callback_data);
self.failUnlessEqual(callback_data["timestamp"], "2013-03-07T17:13:30");
# self.assertIn("error_msg", callback_data);
- self.assertTrue(callback_data.has_key("error_msg"));
+ self.assertTrue("error_msg" in callback_data);
self.failUnlessEqual(callback_data["error_msg"], "Timeout.");
def testDelayedRequest(self):
@@ -1095,16 +1095,16 @@ class TestStreamSensorData(SleekTest):
self.failUnlessEqual(results, ["queued","started","fields","done"]);
# self.assertIn("nodeId", callback_data);
- self.assertTrue(callback_data.has_key("nodeId"));
+ self.assertTrue("nodeId" in callback_data);
self.failUnlessEqual(callback_data["nodeId"], "Device33");
# self.assertIn("timestamp", callback_data);
- self.assertTrue(callback_data.has_key("timestamp"));
+ self.assertTrue("timestamp" in callback_data);
self.failUnlessEqual(callback_data["timestamp"], "2000-01-01T00:01:02");
# self.assertIn("field_Voltage", callback_data);
- self.assertTrue(callback_data.has_key("field_Voltage"));
+ 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.assertIn("field_TestBool", callback_data);
- self.assertTrue(callback_data.has_key("field_TestBool"));
+ self.assertTrue("field_TestBool" in callback_data);
self.failUnlessEqual(callback_data["field_TestBool"], {"name": "TestBool", "value": "true", "typename": "boolean" });