def setUp(self): """ Makes sure that the Module is declared and mocked with the sample xml above. """ super(ImageAnnotationModuleTestCase, self).setUp() # return anything except None to test LMS def test_real_user(useless): useless_user = Mock(email='*****@*****.**', id=useless) return useless_user # test to make sure that role is checked in LMS def test_user_role(): return 'staff' self.system = get_test_system() self.system.get_real_user = test_real_user self.system.get_user_role = test_user_role self.system.anonymous_student_id = None self.mod = ImageAnnotationModule( Mock(), self.system, DictFieldData({'data': self.sample_xml}), ScopeIds(None, None, None, None) )
def setUp(self): """ Makes sure that the Module is declared and mocked with the sample xml above. """ self.mod = ImageAnnotationModule( Mock(), get_test_system(), DictFieldData({'data': self.sample_xml}), ScopeIds(None, None, None, None))