From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] test/test-message-waiting: Add a new test file to validate org.ofono.MessageWaiting
Date: Tue, 08 Mar 2011 13:38:29 -0600 [thread overview]
Message-ID: <4D7685B5.8000808@gmail.com> (raw)
In-Reply-To: <1299601667-7099-1-git-send-email-bertrand.aygon@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
Hi Bertrand,
On 03/08/2011 10:27 AM, Bertrand Aygon wrote:
> ---
> test/test-message-waiting | 36 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 36 insertions(+), 0 deletions(-)
> create mode 100755 test/test-message-waiting
Please also add this to Makefile.am
>
> diff --git a/test/test-message-waiting b/test/test-message-waiting
> new file mode 100755
> index 0000000..79fe810
> --- /dev/null
> +++ b/test/test-message-waiting
> @@ -0,0 +1,36 @@
> +#!/usr/bin/python
> +
> +import gobject
> +import sys
> +import dbus
> +import dbus.mainloop.glib
> +
> +def mw_property_changed(name, value):
> + if name == 'VoicemailMessageCount':
There is a mix of tabs and spaces here.
> + print "MessageWaiting property: '%s' changed to '%d'" % (name, value)
> + else:
> + print "MessageWaiting property: '%s' changed to '%s'" % (name, value)
> +
Can you rewrite the code to not go over 80 characters per line? Even in
our test scripts we try to stick to that rule.
> +if __name__ == "__main__":
> + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
> +
> + bus = dbus.SystemBus()
> +
> + manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> + 'org.ofono.Manager')
> +
> + modems = manager.GetModems()
> +
> + mw = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
> + 'org.ofono.MessageWaiting')
> +
> + mw.connect_to_signal("PropertyChanged", mw_property_changed)
> +
> + properties = mw.GetProperties()
> +
> + print "Voicemail waiting: %s" % (properties['VoicemailWaiting'])
> + print "Voicemail message count: %d" % (properties['VoicemailMessageCount'])
> + print "Voicemail mailbox number: %s" % (properties['VoicemailMailboxNumber'])
> +
> + mainloop = gobject.MainLoop()
> + mainloop.run()
Regards,
-Denis
prev parent reply other threads:[~2011-03-08 19:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 16:27 [PATCH] test/test-message-waiting: Add a new test file to validate org.ofono.MessageWaiting Bertrand Aygon
2011-03-08 19:38 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D7685B5.8000808@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.