Merge lp:~robru/friends/fix-autopkgtest into lp:friends

Proposed by Robert Bruce Park
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 229
Merged at revision: 229
Proposed branch: lp:~robru/friends/fix-autopkgtest
Merge into: lp:friends
Diff against target: 42 lines (+9/-3)
2 files modified
friends/tests/mocks.py (+2/-2)
friends/tests/test_facebook.py (+7/-1)
To merge this branch: bzr merge lp:~robru/friends/fix-autopkgtest
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Robert Bruce Park Approve
Review via email: mp+177487@code.launchpad.net

Commit message

Fix autopkgtest failures.

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
Martin Pitt (pitti) wrote :

I confirm that this fixes the autopkgtest, thank you!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'friends/tests/mocks.py'
2--- friends/tests/mocks.py 2013-04-17 06:13:49 +0000
3+++ friends/tests/mocks.py 2013-07-29 22:12:26 +0000
4@@ -333,7 +333,7 @@
5 pass
6
7 def get_uid(self):
8- return 'test-source-uid'
9+ return self.name
10
11 def get_extension(self, extension_name):
12 return EDSExtension()
13@@ -360,5 +360,5 @@
14
15 def ref_source(self, src_uid):
16 s1 = EDSSource(None, None)
17- s1.set_display_name('test-facebook-contacts')
18+ s1.set_display_name('friends-testsuite-contacts')
19 return s1
20
21=== modified file 'friends/tests/test_facebook.py'
22--- friends/tests/test_facebook.py 2013-07-23 08:17:16 +0000
23+++ friends/tests/test_facebook.py 2013-07-29 22:12:26 +0000
24@@ -590,11 +590,17 @@
25
26 @mock.patch('gi.repository.EBook.BookClient.connect_sync',
27 return_value=EDSBookClientMock())
28+ @mock.patch('gi.repository.EDataServer.SourceRegistry.new_sync',
29+ return_value=EDSRegistry())
30 def test_successful_previously_stored_contact(self, *mocks):
31 result = self.protocol._previously_stored_contact('11111')
32 self.assertEqual(result, True)
33
34- def test_first_run_prepare_eds_connections(self):
35+ @mock.patch('gi.repository.EBook.BookClient.connect_sync',
36+ return_value=EDSBookClientMock())
37+ @mock.patch('gi.repository.EDataServer.SourceRegistry.new_sync',
38+ return_value=EDSRegistry())
39+ def test_first_run_prepare_eds_connections(self, *mocks):
40 self.protocol._name = 'testsuite'
41 self.assertIsNone(self.protocol._address_book_name)
42 self.assertIsNone(self.protocol._eds_source_registry)

Subscribers

People subscribed via source and target branches