test: Add test script for ReleaseAndAnswer

This commit is contained in:
Denis Kenzior 2012-04-23 15:18:08 -05:00
parent 8fb761efb0
commit fe1ced212f
2 changed files with 24 additions and 1 deletions

View File

@ -585,7 +585,8 @@ test_scripts = test/backtrace \
test/cdma-connman-enable \
test/set-context-property \
test/test-gnss \
test/swap-calls
test/swap-calls \
test/release-and-answer
if TEST
testdir = $(pkglibdir)/test

22
test/release-and-answer Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
for path, properties in modems:
print "[ %s ]" % (path)
if "org.ofono.VoiceCallManager" not in properties["Interfaces"]:
continue
mgr = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.VoiceCallManager')
mgr.ReleaseAndAnswer()
break