Merge lp:~alecu/ubuntuone-client/fix-notification-parameters into lp:ubuntuone-client

Proposed by Alejandro J. Cura
Status: Merged
Approved by: Martin Albisetti
Approved revision: 807
Merged at revision: 808
Proposed branch: lp:~alecu/ubuntuone-client/fix-notification-parameters
Merge into: lp:ubuntuone-client
Diff against target: 44 lines (+5/-5)
2 files modified
tests/status/test_aggregator.py (+3/-3)
ubuntuone/status/aggregator.py (+2/-2)
To merge this branch: bzr merge lp:~alecu/ubuntuone-client/fix-notification-parameters
Reviewer Review Type Date Requested Status
Martin Albisetti (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+46358@code.launchpad.net

Commit message

fix the parameters passed to send_notification

Description of the change

fix the parameters passed to send_notification.
The third parameter was supposed to be an icon, but it was being passed a boolean.
Since both parameters are optional, the last parameter passed by the caller was removed.

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

+1

review: Approve
Revision history for this message
Martin Albisetti (beuno) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/status/test_aggregator.py'
2--- tests/status/test_aggregator.py 2011-01-14 17:15:40 +0000
3+++ tests/status/test_aggregator.py 2011-01-14 22:53:10 +0000
4@@ -33,7 +33,7 @@
5
6 def send_notification(self, title, message, icon=None, append=False):
7 """Show a notification to the user."""
8- self.notifications_shown.append((title, message, append))
9+ self.notifications_shown.append((title, message, icon, append))
10
11
12 class StatusAggregatorTestCase(TestCase):
13@@ -59,7 +59,7 @@
14 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
15 is_public, public_url)
16 notification = (aggregator.FILE_PUBLISHED_TITLE,
17- aggregator.FILE_PUBLISHED_MESSAGE, False)
18+ aggregator.FILE_PUBLISHED_MESSAGE, None, False)
19 self.assertIn(notification, self.fake_notification.notifications_shown)
20
21
22@@ -73,5 +73,5 @@
23 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
24 is_public, public_url)
25 notification = (aggregator.FILE_UNPUBLISHED_TITLE,
26- aggregator.FILE_UNPUBLISHED_MESSAGE, False)
27+ aggregator.FILE_UNPUBLISHED_MESSAGE, None, False)
28 self.assertIn(notification, self.fake_notification.notifications_shown)
29
30=== modified file 'ubuntuone/status/aggregator.py'
31--- ubuntuone/status/aggregator.py 2011-01-14 17:15:40 +0000
32+++ ubuntuone/status/aggregator.py 2011-01-14 22:53:10 +0000
33@@ -35,9 +35,9 @@
34 def file_published(self):
35 """A file was published."""
36 self.notification.send_notification(FILE_PUBLISHED_TITLE,
37- FILE_PUBLISHED_MESSAGE, False)
38+ FILE_PUBLISHED_MESSAGE)
39
40 def file_unpublished(self):
41 """A file was unpublished."""
42 self.notification.send_notification(FILE_UNPUBLISHED_TITLE,
43- FILE_UNPUBLISHED_MESSAGE, False)
44+ FILE_UNPUBLISHED_MESSAGE)

Subscribers

People subscribed via source and target branches