def test_payload_packed_correctly(self):
        fmt = self.service.fmt
        payload = self.notification.payload
        msg = self.service.pack_message(payload, self.device)
        unpacked = struct.unpack(fmt % len(payload), msg)
        self.assertEqual(unpacked[-1], payload)
dataset/ETHPy150Open stephenmuss/django-ios-notifications/ios_notifications/tests.py/APNServiceTest.test_payload_packed_correctly/original