'Test that the orphan handler finds the orphans'

@ddt.data(ModuleStoreEnum.Type.split, ModuleStoreEnum.Type.mongo)
def test_get_orphans(self, default_store):

    course = self.create_course_with_orphans(default_store)
    orphan_url = reverse_course_url('orphan_handler', course.id)
    orphans = json.loads(self.client.get(orphan_url, HTTP_ACCEPT='application/json').content)
    self.assertEqual(len(orphans), 3, 'Wrong    #    {}'.format(orphans))
    location = course.location.replace(category='chapter', name='OrphanChapter')
    self.assertIn(unicode(location), orphans)
    location = course.location.replace(category='vertical', name='OrphanVert')
    self.assertIn(unicode(location), orphans)
    location = course.location.replace(category='html', name='OrphanHtml')
    self.assertIn(unicode(location), orphans)
