Something very weird is going on in the tests here. This change seems to fix it here:
=== modified file 'desktopcouch/application/plugins/tests/test_ubuntuone_pairing.py' --- desktopcouch/application/plugins/tests/test_ubuntuone_pairing.py 2011-04-13 21:31:15 +0000 +++ desktopcouch/application/plugins/tests/test_ubuntuone_pairing.py 2011-04-15 01:56:27 +0000 @@ -136,11 +136,13 @@ class TestUbuntuOnePlugin(MockerTestCase """Fail if we get called.""" self.called = True
+ old_pair = uone.pair_with_ubuntuone uone.pair_with_ubuntuone = fail_if_called uone.got_new_credentials(self.couchdb_port, self.blocking_semaphores, 'Unknown App', {}) self.assertFalse(self.called, 'pair_with_ubuntuone was not expected.') self.mocker.replay() + uone.pair_with_ubuntuone = old_pair
def test_got_new_credentials(self): """Check that pairing is called for Ubuntu One.""" @@ -148,11 +150,13 @@ class TestUbuntuOnePlugin(MockerTestCase """Check that pair_with_ubuntuone was called.""" self.called = True
+ old_pair = uone.pair_with_ubuntuone uone.pair_with_ubuntuone = pass_if_called uone.got_new_credentials(self.couchdb_port, self.blocking_semaphores, uone.APP_NAME, {}) self.assertTrue(self.called, 'pair_with_ubuntuone was not called.') self.mocker.replay() + uone.pair_with_ubuntuone = old_pair
def test_listen_to_dbus(self): """Test that listening to credentails works."""
« Back to merge proposal
Something very weird is going on in the tests here. This change seems to fix it here:
=== modified file 'desktopcouch/ application/ plugins/ tests/test_ ubuntuone_ pairing. py' application/ plugins/ tests/test_ ubuntuone_ pairing. py 2011-04-13 21:31:15 +0000 application/ plugins/ tests/test_ ubuntuone_ pairing. py 2011-04-15 01:56:27 +0000 ugin(MockerTest Case
" ""Fail if we get called."""
self. called = True
--- desktopcouch/
+++ desktopcouch/
@@ -136,11 +136,13 @@ class TestUbuntuOnePl
+ old_pair = uone.pair_ with_ubuntuone
uone. pair_with_ ubuntuone = fail_if_called
uone. got_new_ credentials( self.couchdb_ port, self.blocking_ semaphores,
' Unknown App', {})
self. assertFalse( self.called, 'pair_with_ ubuntuone was not expected.')
self. mocker. replay( ) with_ubuntuone = old_pair
+ uone.pair_
def test_got_ new_credentials (self): ugin(MockerTest Case
" ""Check that pair_with_ubuntuone was called."""
self. called = True
"""Check that pairing is called for Ubuntu One."""
@@ -148,11 +150,13 @@ class TestUbuntuOnePl
+ old_pair = uone.pair_ with_ubuntuone
uone. pair_with_ ubuntuone = pass_if_called
uone. got_new_ credentials( self.couchdb_ port, self.blocking_ semaphores,
uone. APP_NAME, {})
self. assertTrue( self.called, 'pair_with_ ubuntuone was not called.')
self. mocker. replay( ) with_ubuntuone = old_pair
+ uone.pair_
def test_listen_ to_dbus( self):
"""Test that listening to credentails works."""