aboutsummaryrefslogtreecommitdiffstats
path: root/selftest
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-09 14:18:34 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-04-09 18:24:52 +0200
commitb3daaea6b5207b3b19c9ccd10b8f76a56d2e6711 (patch)
treec5717da8b1f07f83dbd7d9a1799f898a62877a58 /selftest
parente35284401187bbd6718c93393dd175f8140d9f38 (diff)
implement modem and nitb bits for a real test
Diffstat (limited to 'selftest')
-rwxr-xr-xselftest/real_suite/suites/sms/mo_mt_sms.py9
-rwxr-xr-xselftest/sms_test.py20
2 files changed, 24 insertions, 5 deletions
diff --git a/selftest/real_suite/suites/sms/mo_mt_sms.py b/selftest/real_suite/suites/sms/mo_mt_sms.py
index 05be48c..b97d332 100755
--- a/selftest/real_suite/suites/sms/mo_mt_sms.py
+++ b/selftest/real_suite/suites/sms/mo_mt_sms.py
@@ -8,19 +8,18 @@ ms_mo = suite.modem()
ms_mt = suite.modem()
print('start nitb and bts...')
-nitb.add_bts(bts)
+nitb.bts_add(bts)
nitb.start()
sleep(.1)
assert nitb.running()
bts.start()
-nitb.add_subscriber(ms_mo)
-nitb.add_subscriber(ms_mt)
+nitb.subscriber_add(ms_mo)
+nitb.subscriber_add(ms_mt)
ms_mo.connect(nitb)
ms_mt.connect(nitb)
wait(nitb.subscriber_attached, ms_mo, ms_mt)
sms = ms_mo.sms_send(ms_mt.msisdn)
-sleep(3)
-wait(nitb.sms_received, sms)
+wait(ms_mt.sms_received, sms)
diff --git a/selftest/sms_test.py b/selftest/sms_test.py
new file mode 100755
index 0000000..25fb551
--- /dev/null
+++ b/selftest/sms_test.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import _prep
+from osmo_gsm_tester import ofono_client
+
+print(ofono_client.Sms())
+print(ofono_client.Sms())
+print(ofono_client.Sms())
+sms = ofono_client.Sms('123', '456')
+print(str(sms))
+
+sms2 = ofono_client.Sms('123', '456')
+print(str(sms2))
+assert sms != sms2
+
+sms2.msg = str(sms.msg)
+print(str(sms2))
+assert sms == sms2
+
+# vim: expandtab tabstop=4 shiftwidth=4