From 7be7b50ba9ec5e115b2a5af5a801c1c4f73febea Mon Sep 17 00:00:00 2001 From: Ben Patterson Date: Fri, 12 Dec 2014 21:45:23 -0500 Subject: [PATCH] Mock out the underlying segment-io call. TE-532 --- common/djangoapps/third_party_auth/tests/specs/base.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index 3c34754931..1ffd450f1a 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -424,6 +424,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase): request, strategy = self.get_request_and_strategy( auth_entry=pipeline.AUTH_ENTRY_LOGIN, redirect_uri='social:complete') strategy.backend.auth_complete = mock.MagicMock(return_value=self.fake_auth_complete(strategy)) + pipeline.analytics.track = mock.MagicMock() request.user = self.create_user_models_for_existing_account( strategy, 'user@example.com', 'password', self.get_username(), skip_social_auth=True) @@ -558,6 +559,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase): request, strategy = self.get_request_and_strategy( auth_entry=pipeline.AUTH_ENTRY_LOGIN, redirect_uri='social:complete') strategy.backend.auth_complete = mock.MagicMock(return_value=self.fake_auth_complete(strategy)) + pipeline.analytics.track = mock.MagicMock() user = self.create_user_models_for_existing_account( strategy, 'user@example.com', 'password', self.get_username()) self.assert_social_auth_exists_for_user(user, strategy)