[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82
Daniel Willmann
daniel at totalueberwachung.de
Mon Feb 2 18:51:55 UTC 2009
The following commit has been merged in the master branch:
commit 3c27e541108134a8e318c35836674af602cf8d1e
Author: Daniel Willmann <daniel at totalueberwachung.de>
Date: Mon Jan 12 17:14:45 2009 +0100
tests: Add a test case for invalid Service Center timestamp parsing
diff --git a/tests/sms.py b/tests/sms.py
index 796fb2d..243a6b5 100755
--- a/tests/sms.py
+++ b/tests/sms.py
@@ -140,6 +140,13 @@ class SMSTests(unittest.TestCase):
self.assert_(sms.pdu() == "00410006919421430A08160500030A02010055006E00690063006F006400652320",
"SMS UCS2 alphabet encoding failed, PDU:\n%s" % sms.pdu())
+ def test_invalid_scts_date_in_pdu(self):
+ """Ensure invalid dates don't break SMS decoding"""
+
+ invalid_date_pdu = "07914140279505F74404D011002000803190819234000704010200018000"
+ sms = SMS.decode(invalid_date_pdu, "sms-deliver")
+ self.assert_(sms.properties["timestamp"] == "Tue Jan 1 00:00:00 1980 +0000")
+ self.assert_(sms.properties.has_key("error"))
if __name__ == '__main__':
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list