Commit 352fce6e by Ben Patterson

Fix another analytics.init secret error message (noise).

parent 7be7b50b
...@@ -3,6 +3,7 @@ Tests for the Shopping Cart Models ...@@ -3,6 +3,7 @@ Tests for the Shopping Cart Models
""" """
from decimal import Decimal from decimal import Decimal
import datetime import datetime
import os
import smtplib import smtplib
from boto.exception import BotoServerError # this is a super-class of SESError and catches connection errors from boto.exception import BotoServerError # this is a super-class of SESError and catches connection errors
...@@ -233,6 +234,9 @@ class OrderTest(ModuleStoreTestCase): ...@@ -233,6 +234,9 @@ class OrderTest(ModuleStoreTestCase):
item = CertificateItem.add_to_order(cart, self.course_key, self.cost, 'honor') item = CertificateItem.add_to_order(cart, self.course_key, self.cost, 'honor')
# course enrollment object should be created but still inactive # course enrollment object should be created but still inactive
self.assertFalse(CourseEnrollment.is_enrolled(self.user, self.course_key)) self.assertFalse(CourseEnrollment.is_enrolled(self.user, self.course_key))
# the analytics client pipes output to stderr when using the default client
devnull = open(os.devnull, 'w')
with patch('sys.stderr', devnull):
cart.purchase() cart.purchase()
self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_key)) self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_key))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment