~paulliu/friends/add-twitter-contacts

« back to all changes in this revision

Viewing changes to friends/tests/test_facebook.py

  • Committer: Robert Bruce Park
  • Date: 2012-11-06 18:25:57 UTC
  • Revision ID: robert.park@canonical.com-20121106182557-51dsapd0qlrfvwaw
Fix a race condition in the test suite that was causing a FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
    def test_error_response(self, *mocks):
96
96
        with LogMock('friends.utils.base',
97
97
                     'friends.protocols.facebook') as log_mock:
98
 
            self.protocol('receive')
 
98
            self.protocol.receive()
99
99
            contents = log_mock.empty(trim=False)
100
100
        self.assertEqual(contents, """\
101
 
Facebook.receive is starting in a new thread.
102
101
Logging in to Facebook
103
102
Facebook UID: None
104
103
Facebook error (190 OAuthException): Bad access token
105
 
Facebook.receive has completed, thread exiting.
106
104
""")
107
105
 
108
106
    @mock.patch('friends.utils.http.Soup.Message',