Skip to content
Snippets Groups Projects
Unverified Commit 8fb4049c authored by Christie Rice's avatar Christie Rice Committed by GitHub
Browse files

Remove flaky test (#23075)

parent 35231873
No related branches found
No related tags found
No related merge requests found
......@@ -617,32 +617,6 @@ class SailthruTests(TestCase):
self.course_id2 = 'edX/toy/2016_Fall'
self.course_url2 = 'http://lms.testserver.fake/courses/edX/toy/2016_Fall/info'
@patch('sailthru.sailthru_client.SailthruClient.purchase')
@patch('sailthru.sailthru_client.SailthruClient.api_get')
@patch('sailthru.sailthru_client.SailthruClient.api_post')
def test_update_course_enrollment(self, mock_sailthru_api_post,
mock_sailthru_api_get, mock_sailthru_purchase):
"""test update sailthru user record"""
# create mocked Sailthru API responses
mock_sailthru_api_post.return_value = MockSailthruResponse({'ok': True})
mock_sailthru_api_get.return_value = MockSailthruResponse({'user': {"id": TEST_EMAIL, "fields": {"vars": 1}}})
mock_sailthru_purchase.return_value = MockSailthruResponse({'ok': True})
self.user.email = TEST_EMAIL
CourseEnrollmentFactory(user=self.user, course_id=self.course_id)
with patch('email_marketing.tasks.build_course_url') as m:
m.return_value = self.course_url
update_course_enrollment(TEST_EMAIL, self.course_id, 'audit')
item = [{
'vars': {'course_run_id': u'edX/toy/2012_Fall', 'mode': 'audit'},
'url': self.course_url,
'price': 0,
'qty': 1,
'id': 'edX/toy/2012_Fall-audit',
'title': 'Course edX/toy/2012_Fall mode: audit'
}]
mock_sailthru_purchase.assert_called_with(TEST_EMAIL, item, options={})
@patch('sailthru.sailthru_client.SailthruClient.purchase')
@patch('sailthru.sailthru_client.SailthruClient.api_get')
@patch('sailthru.sailthru_client.SailthruClient.api_post')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment