cosmetic: review mo_mt_sms.py's logging
Implement the Modem.log_info() function, use that instead of logging all modem
properties.
Tweak mo_mt_sms.py print() statements.
Pass modem object to SMS generation to inlcude the modem name as SMS token.
Change-Id: I2b17fce0b3b05594fd9038b54e5b65f5127bd0a4
diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py
index 96e1caf..b9383ea 100755
--- a/suites/aoip_sms/mo_mt_sms.py
+++ b/suites/aoip_sms/mo_mt_sms.py
@@ -23,7 +23,12 @@
ms_mo.connect(bsc)
ms_mt.connect(bsc)
+
+ms_mo.log_info()
+ms_mt.log_info()
+
+print('waiting for modems to attach...')
wait(msc.subscriber_attached, ms_mo, ms_mt)
-sms = ms_mo.sms_send(ms_mt.msisdn)
+sms = ms_mo.sms_send(ms_mt)
wait(ms_mt.sms_was_received, sms)
diff --git a/suites/sms/mo_mt_sms.py b/suites/sms/mo_mt_sms.py
index 7176197..860f5e7 100755
--- a/suites/sms/mo_mt_sms.py
+++ b/suites/sms/mo_mt_sms.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
from osmo_gsm_tester.test import *
-print('use resources...')
nitb = suite.nitb()
bts = suite.bts()
ms_mo = suite.modem()
@@ -10,8 +9,6 @@
print('start nitb and bts...')
nitb.bts_add(bts)
nitb.start()
-sleep(1)
-assert nitb.running()
bts.start()
nitb.subscriber_add(ms_mo)
@@ -19,9 +16,12 @@
ms_mo.connect(nitb)
ms_mt.connect(nitb)
-print(ms_mo.properties())
-print(ms_mt.properties())
+
+ms_mo.log_info()
+ms_mt.log_info()
+
+print('waiting for modems to attach...')
wait(nitb.subscriber_attached, ms_mo, ms_mt)
-sms = ms_mo.sms_send(ms_mt.msisdn)
+sms = ms_mo.sms_send(ms_mt)
wait(ms_mt.sms_was_received, sms)