Merge lp:~facundo/magicicada-gui/initial-started into lp:magicicada-gui

Proposed by Facundo Batista
Status: Merged
Approved by: Natalia Bidart
Approved revision: 29
Merged at revision: 30
Proposed branch: lp:~facundo/magicicada-gui/initial-started
Merge into: lp:magicicada-gui
Diff against target: 37 lines (+15/-0)
2 files modified
magicicada/syncdaemon.py (+3/-0)
magicicada/tests/test_syncdaemon.py (+12/-0)
To merge this branch: bzr merge lp:~facundo/magicicada-gui/initial-started
Reviewer Review Type Date Requested Status
Natalia Bidart Approve
Review via email: mp+26264@code.launchpad.net

Description of the change

Set is_started at init time.

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

yey!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'magicicada/syncdaemon.py'
--- magicicada/syncdaemon.py 2010-05-27 12:45:13 +0000
+++ magicicada/syncdaemon.py 2010-05-28 02:51:29 +0000
@@ -107,7 +107,10 @@
107107
108 # load initial data if ubuntuone-client already started108 # load initial data if ubuntuone-client already started
109 if self.dbus.is_sd_started():109 if self.dbus.is_sd_started():
110 self.current_state._set(is_started=True)
110 self._get_initial_data()111 self._get_initial_data()
112 else:
113 self.current_state._set(is_started=False)
111114
112115
113 def shutdown(self):116 def shutdown(self):
114117
=== modified file 'magicicada/tests/test_syncdaemon.py'
--- magicicada/tests/test_syncdaemon.py 2010-05-27 12:45:13 +0000
+++ magicicada/tests/test_syncdaemon.py 2010-05-28 02:51:29 +0000
@@ -189,6 +189,18 @@
189 self.assertEqual(self.sd.current_state.queues, 'queues2')189 self.assertEqual(self.sd.current_state.queues, 'queues2')
190 self.assertEqual(self.sd.current_state.connection, 'connection2')190 self.assertEqual(self.sd.current_state.connection, 'connection2')
191191
192 def test_is_started_fixed_at_init_no(self):
193 """Status.is_started is set at init time, to no."""
194 FakeDBusInterface.fake_sd_started = False
195 sd = SyncDaemon(FakeDBusInterface)
196 self.assertFalse(sd.current_state.is_started)
197
198 def test_is_started_fixed_at_init_yes(self):
199 """Status.is_started is set at init time, to yes."""
200 FakeDBusInterface.fake_sd_started = True
201 sd = SyncDaemon(FakeDBusInterface)
202 self.assertTrue(sd.current_state.is_started)
203
192204
193class ContentQueueChangedTests(BaseTest):205class ContentQueueChangedTests(BaseTest):
194 """Check the ContenQueueChanged handling."""206 """Check the ContenQueueChanged handling."""

Subscribers

People subscribed via source and target branches