From b3daaea6b5207b3b19c9ccd10b8f76a56d2e6711 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sun, 9 Apr 2017 14:18:34 +0200 Subject: implement modem and nitb bits for a real test Change-Id: I1ca3bd874aed1265d83a46340e9b3e469075c7ee --- selftest/real_suite/suites/sms/mo_mt_sms.py | 9 ++++----- selftest/sms_test.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100755 selftest/sms_test.py (limited to 'selftest') 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 -- cgit v1.2.3