'Create a new course try exporting in a path specified'

@ddt.data(ModuleStoreEnum.Type.mongo, ModuleStoreEnum.Type.split)
def test_export_course_with_directory_name(self, store):

    course = CourseFactory.create(default_store=store)
    course_id = unicode(course.id)
    self.assertTrue(modulestore().has_course(course.id), 'Could    not    find    course    in    {}'.format(store))
    errstring = "Invalid    course_key:    'InvalidCourseID'."
    with self.assertRaisesRegexp(CommandError, errstring):
        call_command('export', 'InvalidCourseID', self.temp_dir_1)
    for output_dir in [self.temp_dir_1, self.temp_dir_2]:
        call_command('export', course_id, output_dir)
