Merge lp:~dobey/ubuntuone-client/farewell-u1 into lp:~diegosarmentero/ubuntuone-client/farewell-u1

Proposed by dobey
Status: Merged
Merged at revision: 1411
Proposed branch: lp:~dobey/ubuntuone-client/farewell-u1
Merge into: lp:~diegosarmentero/ubuntuone-client/farewell-u1
Diff against target: 109 lines (+13/-13)
1 file modified
tests/status/test_aggregator.py (+13/-13)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/farewell-u1
Reviewer Review Type Date Requested Status
Diego Sarmentero Pending
Review via email: mp+215303@code.launchpad.net

Commit message

Fix the tests.

To post a comment you must log in.

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 2012-11-15 13:23:43 +0000
3+++ tests/status/test_aggregator.py 2014-04-10 21:01:21 +0000
4@@ -943,7 +943,7 @@
5 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
6 is_public, public_url)
7 self.assertEqual(
8- 1, len(self.status_frontend.notification.notifications_shown))
9+ 2, len(self.status_frontend.notification.notifications_shown))
10
11 def test_file_unpublished(self):
12 """A file unpublished event is processed."""
13@@ -955,7 +955,7 @@
14 self.listener.handle_AQ_CHANGE_PUBLIC_ACCESS_OK(share_id, node_id,
15 is_public, public_url)
16 self.assertEqual(
17- 1, len(self.status_frontend.notification.notifications_shown))
18+ 2, len(self.status_frontend.notification.notifications_shown))
19
20 def test_download_started(self):
21 """A download was added to the queue."""
22@@ -1053,7 +1053,7 @@
23 self.fakevm.volumes[SHARE_ID] = share
24 self.listener.handle_VM_SHARE_CREATED(SHARE_ID)
25 self.assertEqual(
26- 1, len(self.status_frontend.notification.notifications_shown))
27+ 2, len(self.status_frontend.notification.notifications_shown))
28
29 def test_already_subscribed_new_udf_available(self):
30 """A new udf that was already subscribed."""
31@@ -1061,14 +1061,14 @@
32 udf.subscribed = True
33 self.listener.handle_VM_UDF_CREATED(udf)
34 self.assertEqual(
35- 0, len(self.status_frontend.notification.notifications_shown))
36+ 1, len(self.status_frontend.notification.notifications_shown))
37
38 def test_new_udf_available(self):
39 """A new udf is available for subscription."""
40 udf = UDF()
41 self.listener.handle_VM_UDF_CREATED(udf)
42 self.assertEqual(
43- 1, len(self.status_frontend.notification.notifications_shown))
44+ 2, len(self.status_frontend.notification.notifications_shown))
45
46 def test_two_new_udfs_available(self):
47 """A new udf is available for subscription."""
48@@ -1077,14 +1077,14 @@
49 udf2 = UDF()
50 self.listener.handle_VM_UDF_CREATED(udf2)
51 self.assertEqual(
52- 2, len(self.status_frontend.notification.notifications_shown))
53+ 3, len(self.status_frontend.notification.notifications_shown))
54
55 def test_server_connection_lost(self):
56 """The client connected to the server."""
57 self.status_frontend.aggregator.connected = True
58 self.listener.handle_SYS_CONNECTION_LOST()
59 self.assertEqual(
60- 0, len(self.status_frontend.notification.notifications_shown))
61+ 1, len(self.status_frontend.notification.notifications_shown))
62 self.assertFalse(self.status_frontend.aggregator.connected)
63
64 def test_server_connection_made(self):
65@@ -1092,7 +1092,7 @@
66 self.status_frontend.aggregator.connected = False
67 self.listener.handle_SYS_CONNECTION_MADE()
68 self.assertEqual(
69- 0, len(self.status_frontend.notification.notifications_shown))
70+ 1, len(self.status_frontend.notification.notifications_shown))
71 self.assertTrue(self.status_frontend.aggregator.connected)
72
73 def test_set_show_all_notifications(self):
74@@ -1117,7 +1117,7 @@
75 self.listener.handle_SYS_QUOTA_EXCEEDED(
76 volume_id=UDF_ID, free_bytes=0)
77 self.assertEqual(
78- 0, len(self.status_frontend.notification.notifications_shown))
79+ 1, len(self.status_frontend.notification.notifications_shown))
80 mocker.restore()
81 mocker.verify()
82
83@@ -1138,7 +1138,7 @@
84 self.listener.handle_SYS_QUOTA_EXCEEDED(
85 volume_id=ROOT_ID, free_bytes=0)
86 self.assertEqual(
87- 0, len(self.status_frontend.notification.notifications_shown))
88+ 1, len(self.status_frontend.notification.notifications_shown))
89 mocker.restore()
90 mocker.verify()
91
92@@ -1162,15 +1162,15 @@
93 self.fakevm.volumes[SHARE_ID] = share
94 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
95 self.assertEqual(
96- 1, len(self.status_frontend.notification.notifications_shown))
97+ 2, len(self.status_frontend.notification.notifications_shown))
98 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
99 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
100 self.assertEqual(
101- 1, len(self.status_frontend.notification.notifications_shown))
102+ 2, len(self.status_frontend.notification.notifications_shown))
103 self.status_frontend.aggregator.clock.advance(aggregator.ONE_DAY + 1)
104 self.listener.handle_SYS_QUOTA_EXCEEDED(SHARE_ID, BYTES)
105 self.assertEqual(
106- 2, len(self.status_frontend.notification.notifications_shown))
107+ 3, len(self.status_frontend.notification.notifications_shown))
108 mocker.restore()
109 mocker.verify()
110

Subscribers

People subscribed via source and target branches

to all changes: