[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone5.1

Guillaume Chereau charlie at openmoko.org
Sat Jun 6 12:21:44 UTC 2009


The following commit has been merged in the master branch:
commit 4ae7746ea5080ce2b064d3e8c1bcd8f06260218a
Author: Guillaume Chereau <charlie at openmoko.org>
Date:   Fri Feb 6 14:34:44 2009 +0800

    tests: add tests from storing messages into the SIM

diff --git a/tests/sim.py b/tests/sim.py
index bfa4c5e..24d02c7 100644
--- a/tests/sim.py
+++ b/tests/sim.py
@@ -29,7 +29,8 @@ def retry_on_sim_not_ready(func):
         try:
             yield func(*args, **kargs)
         except dbus.DBusException, ex:
-            if ex.get_dbus_name() == 'org.freesmartphone.GSM.SIM.NotReady':
+            # XXX: the org.freesmartphone.GSM.Device.Failed shouldn't be here !
+            if ex.get_dbus_name() in ['org.freesmartphone.GSM.SIM.NotReady', 'org.freesmartphone.GSM.Device.Failed']:
                 # We give the SIM 30 seconds to get ready
                 yield WaitDBusSignal(sim, 'ReadyStatus', 30)
                 yield func(*args, **kargs)
@@ -72,6 +73,28 @@ class SimTests(unittest.TestCase):
         info = self.sim.GetPhonebookInfo('contacts')
         min_index = int(info['min_index'])
         self.sim.StoreEntry('contacts', min_index, "TEST", "0123456789")
+
+    @test.request("sim.present", True)
+    @retry_on_sim_not_ready
+    def test_add_message(self):
+        """Try to add a new text message"""
+        msg = u"hello"
+        number = '012345678'
+        prop = dict(type='SMS_DELIVER',
+                    alphabet='gsm_default')
+        index = self.sim.StoreMessage(number, msg, prop)
+
+    @test.request("sim.present", True)
+    @retry_on_sim_not_ready
+    def test_add_binary_message(self):
+        """Try to add a new binary message"""
+        msg = 'some binary data \x00 <-- with a null char'
+        number = '012345678'
+        prop = dict(type='SMS_DELIVER',
+                    alphabet='binary')
+        index = self.sim.StoreMessage(number, msg, prop)
+
+
         
 if __name__ == '__main__':
     suite = unittest.defaultTestLoader.loadTestsFromTestCase(SimTests)

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list