'Test the get_courses_for_wiki method'

@ddt.data((ModuleStoreEnum.Type.mongo, 2, 0), (ModuleStoreEnum.Type.split, 2, 0))
@ddt.unpack
def test_get_courses_for_wiki(self, default_ms, max_find, max_send):

    self.initdb(default_ms)
    with check_mongo_calls(max_find, max_send):
        wiki_courses = self.store.get_courses_for_wiki('999')
    self.assertEqual(len(wiki_courses), 1)
    self.assertIn(self.course_locations[self.MONGO_COURSEID].course_key.replace(branch=None), wiki_courses)
    self.assertEqual(len(self.store.get_courses_for_wiki('edX.simple.2012_Fall')), 0)
    self.assertEqual(len(self.store.get_courses_for_wiki('no_such_wiki')), 0)
