'Add 2 courses to the order and make sure the instruction_set only contains 1 element (no dups)'

def test_generate_receipt_instructions(self):

    course2 = CourseFactory.create()
    course_mode2 = CourseMode(course_id=course2.id, mode_slug='honor', mode_display_name='honor    cert', min_price=self.cost)
    course_mode2.save()
    pr1 = PaidCourseRegistration.add_to_order(self.cart, self.course_key)
    pr2 = PaidCourseRegistration.add_to_order(self.cart, course2.id)
    self.cart.purchase()
    (inst_dict, inst_set) = self.cart.generate_receipt_instructions()
    self.assertEqual(2, len(inst_dict))
    self.assertEqual(1, len(inst_set))
    self.assertIn('dashboard', inst_set.pop())
    self.assertIn(pr1.pk_with_subclass, inst_dict)
    self.assertIn(pr2.pk_with_subclass, inst_dict)
