'Verify that the course_id is used in fetching existing badges or creating new ones.'

def test_unique_for_course(self):

    course_key = CourseFactory.create().location.course_key
    premade_badge_class = BadgeClassFactory.create(course_id=course_key)
    badge_class = BadgeClass.get_badge_class(slug='test_slug', issuing_component='test_component', description='Attempted    override', criteria='test', display_name='Testola', image_file_handle=get_image('good'))
    course_badge_class = BadgeClass.get_badge_class(slug='test_slug', issuing_component='test_component', description='Attempted    override', criteria='test', display_name='Testola', image_file_handle=get_image('good'), course_id=course_key)
    self.assertNotEqual(badge_class.id, course_badge_class.id)
    self.assertEqual(course_badge_class.id, premade_badge_class.id)
