Commit af8475ad by David Ormsbee

Make sure CourseFactory creates desired courses before shopping cart tests run.

parent 8491927e
...@@ -25,7 +25,7 @@ class OrderTest(TestCase): ...@@ -25,7 +25,7 @@ class OrderTest(TestCase):
def setUp(self): def setUp(self):
self.user = UserFactory.create() self.user = UserFactory.create()
self.course_id = "org/test/Test_Course" self.course_id = "org/test/Test_Course"
CourseFactory.create(org='org', number='test', display_name='Test Course 1') CourseFactory.create(org='org', number='test', display_name='Test Course')
for i in xrange(1, 5): for i in xrange(1, 5):
CourseFactory.create(org='org', number='test', display_name='Test Course {0}'.format(i)) CourseFactory.create(org='org', number='test', display_name='Test Course {0}'.format(i))
self.cost = 40 self.cost = 40
...@@ -238,6 +238,7 @@ class CertificateItemTest(TestCase): ...@@ -238,6 +238,7 @@ class CertificateItemTest(TestCase):
self.user = UserFactory.create() self.user = UserFactory.create()
self.course_id = "org/test/Test_Course" self.course_id = "org/test/Test_Course"
self.cost = 40 self.cost = 40
CourseFactory.create(org='org', number='test', run='course', display_name='Test Course')
course_mode = CourseMode(course_id=self.course_id, course_mode = CourseMode(course_id=self.course_id,
mode_slug="honor", mode_slug="honor",
mode_display_name="honor cert", mode_display_name="honor cert",
...@@ -248,7 +249,6 @@ class CertificateItemTest(TestCase): ...@@ -248,7 +249,6 @@ class CertificateItemTest(TestCase):
mode_display_name="verified cert", mode_display_name="verified cert",
min_price=self.cost) min_price=self.cost)
course_mode.save() course_mode.save()
CourseFactory.create(org='org', number='test', run='course', display_name='Test Course')
def test_existing_enrollment(self): def test_existing_enrollment(self):
CourseEnrollment.enroll(self.user, self.course_id) CourseEnrollment.enroll(self.user, self.course_id)
......
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