Merge lp:~mandel/ubuntuone-client/add_dbus_syndaemon_signal_tests into lp:ubuntuone-client

Proposed by Manuel de la Peña
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 865
Merged at revision: 880
Proposed branch: lp:~mandel/ubuntuone-client/add_dbus_syndaemon_signal_tests
Merge into: lp:ubuntuone-client
Prerequisite: lp:~mandel/ubuntuone-client/add_dbus_events_signal_tests
Diff against target: 37 lines (+27/-0)
1 file modified
tests/platform/linux/test_dbus.py (+27/-0)
To merge this branch: bzr merge lp:~mandel/ubuntuone-client/add_dbus_syndaemon_signal_tests
Reviewer Review Type Date Requested Status
Facundo Batista (community) Approve
John O'Brien (community) Approve
Review via email: mp+50345@code.launchpad.net

Commit message

Add extra tests for the SyncDaemon emit signals.

Description of the change

Add extra tests for the SyncDaemon emit signals.

To post a comment you must log in.
Revision history for this message
John O'Brien (jdobrien) wrote :

nice...

review: Approve
863. By Manuel de la Peña

Merged with branch that provides test for the emit methods in the Events class.

864. By Manuel de la Peña

Merged with branch that provides test for the emit methods in the SyncDaemon class.

865. By Manuel de la Peña

Merged add_dbus_events_signal_tests into add_dbus_syndaemon_signal_tests.

Revision history for this message
Facundo Batista (facundo) wrote :

Good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/platform/linux/test_dbus.py'
--- tests/platform/linux/test_dbus.py 2011-02-21 09:30:58 +0000
+++ tests/platform/linux/test_dbus.py 2011-02-21 09:30:58 +0000
@@ -3632,6 +3632,33 @@
3632 self.events.emit_event(event)3632 self.events.emit_event(event)
36333633
36343634
3635class TestSyncDaemonEmitSignals(DBusTwistedTestCase, MockerTestCase):
3636 """Test that the emit method have been correctly implemented."""
3637
3638 def setUp(self):
3639 """Setup tests."""
3640 super(TestSyncDaemonEmitSignals, self).setUp()
3641 self.signal_method = self.mocker.mock()
3642
3643
3644 def test_emit_root_mismatch(self):
3645 """Emit RootMismatch signal."""
3646 root_id = 'root_id'
3647 new_root_id = 'new_root_id'
3648 self.sync.RootMismatch = self.signal_method
3649 self.signal_method(root_id, new_root_id)
3650 self.mocker.replay()
3651 self.sync.emit_root_mismatch(root_id, new_root_id)
3652
3653 def test_emit_quota_exceeded(self):
3654 """Emit QuotaExceeded signal."""
3655 volume_dict = 'volume_dict'
3656 self.sync.QuotaExceeded = self.signal_method
3657 self.signal_method(volume_dict)
3658 self.mocker.replay()
3659 self.sync.emit_quota_exceeded(volume_dict)
3660
3661
3635def test_suite():3662def test_suite():
3636 """Collect these tests only on linux."""3663 """Collect these tests only on linux."""
3637 import sys3664 import sys

Subscribers

People subscribed via source and target branches