'Test create_course rejects duplicate id'

def test_create_id_dupe(self):

    user = random.getrandbits(32)
    courses = modulestore().get_courses(BRANCH_NAME_DRAFT)
    with self.assertRaises(DuplicateCourseError):
        dupe_course_key = courses[0].location.course_key
        modulestore().create_course(dupe_course_key.org, dupe_course_key.course, dupe_course_key.run, user, BRANCH_NAME_DRAFT)
