diff options
author | crvi <crvisqr@gmail.com> | 2020-08-14 00:04:04 +0530 |
---|---|---|
committer | crvi <crvisqr@gmail.com> | 2020-08-14 03:44:02 +0530 |
commit | dea7877308dc99300d1370284cccf624582ccd71 (patch) | |
tree | 8a9d79218ed7365c33a5bbdef9cc54dd0e29de4d | |
parent | 04f0e41e1ed8ad19c9f0d3e19efe208ec4e144b0 (diff) | |
download | zeitgeist-dea7877308dc99300d1370284cccf624582ccd71.tar.gz |
test: fix testEventWithBinaryPayload test failure
======================================================================
FAIL: testEventWithBinaryPayload (engine-test.ZeitgeistEngineTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "zeitgeist/test/dbus/engine-test.py", line 425, in testEventWithBinaryPayload
self.assertEqual(event.payload, result.payload)
AssertionError: b'\n\t\t<Content name="Telepathy" class="[222 chars]ent>' != '\n\t\t<Content name="Telepathy" class="T[221 chars]ent>'
-rw-r--r-- | test/dbus/engine-test.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/dbus/engine-test.py b/test/dbus/engine-test.py index 81b085a7..d1b5efa3 100644 --- a/test/dbus/engine-test.py +++ b/test/dbus/engine-test.py @@ -412,7 +412,7 @@ class ZeitgeistEngineTest(testutils.RemoteTestCase): <Content name="Telepathy" class="Text"> <header>johnsmith@foo.bar</header> <body> - John: Here is a talking point + John: 你好 Here is a talking point You: Ok that looks fine </body> <launcher command="{application} johnsmith@foo.bar"/> @@ -421,9 +421,11 @@ class ZeitgeistEngineTest(testutils.RemoteTestCase): ids = self.insertEventsAndWait([event]) result = self.getEventsAndWait(ids)[0] - result.payload = "".join(str(x) for x in result.payload) - self.assertEqual(event.payload, result.payload) - self.assertEventsEqual(event, result) + + # verify all '248' bytes + self.assertEqual(len(event.payload), len(result.payload)) + for i in list(range(len(event.payload))): + self.assertEqual(event.payload[i], result.payload[i]) def testQueryByParent(self): ev = new_event(subject_interpretation=Interpretation.AUDIO) |