Skip to content

Commit

Permalink
Ticket CE-787 - Fixed doctstring, added doctest
Browse files Browse the repository at this point in the history
Skipped tests against dictionaries because the workaround
clutters up the documentation. Functionality is tested with nose.
  • Loading branch information
Lisa Hewus Fresh committed Jan 1, 2015
1 parent 5a1d702 commit 3b6777c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[nosetests]
with-doctest=1
2 changes: 1 addition & 1 deletion urbanairship/push/audience.py
Expand Up @@ -159,7 +159,7 @@ def recent_date(**kwargs):
>>> recent_date(months=6)
{'recent': {'months': 6}}
>>> recent_date(weeks=3)
{True, 'recent': {'weeks': 3}}
{'recent': {'weeks': 3}}
"""
if not len(kwargs) == 1:
raise ValueError("Must specificy a single date resolution")
Expand Down
6 changes: 3 additions & 3 deletions urbanairship/push/payload.py
Expand Up @@ -61,7 +61,7 @@ def ios(alert=None, badge=None, sound=None, content_available=False,
sent to the device.
:keyword expiry: An integer or time set in UTC as a string
>>> ios(alert='Hello!', sound='cat.caf',
... extra={'articleid': '12345'})
... extra={'articleid': '12345'}) # doctest: +SKIP
{'sound': 'cat.caf', 'extra': {'articleid': '12345'}, 'alert': 'Hello!'}
"""
Expand Down Expand Up @@ -107,7 +107,7 @@ def android(alert=None, collapse_key=None, time_to_live=None,
for details on ``collapse_key``, ``time_to_live``, and
``delay_while_idle``.
>>> android(alert='Hello!', extra={'articleid': '12345'})
>>> android(alert='Hello!', extra={'articleid': '12345'}) # doctest: +SKIP
{'extra': {'articleid': '12345'}, 'alert': 'Hello!'}
"""
Expand Down Expand Up @@ -141,7 +141,7 @@ def amazon(alert=None, consolidation_key=None, expires_after=None, extra=None,
:keyword summary: String
>>> amazon(alert='Hello!', title='My Title',
... extra={'articleid': '12345'})
... extra={'articleid': '12345'}) # doctest: +SKIP
{'title': 'My Title', 'extra': {'articleid': '12345'}, 'alert': 'Hello!'}
"""
Expand Down

0 comments on commit 3b6777c

Please sign in to comment.