'Test to check for the order generated registration
codes.'

def test_order_generated_registration_codes(self):

    self.cart.order_type = 'business'
    self.cart.save()
    item = CourseRegCodeItem.add_to_order(self.cart, self.course_key, 2)
    self.cart.purchase()
    registration_codes = CourseRegistrationCode.order_generated_registration_codes(self.course_key)
    self.assertEqual(registration_codes.count(), item.qty)
