From dea7877308dc99300d1370284cccf624582ccd71 Mon Sep 17 00:00:00 2001 From: crvi Date: Fri, 14 Aug 2020 00:04:04 +0530 Subject: 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
johnsmith@foo.bar
- John: Here is a talking point + John: 你好 Here is a talking point You: Ok that looks fine @@ -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) -- cgit v1.2.1