def testRegisterSchool(self): admin = Admin("") self.assertTrue(admin.registerSchool("René Descartes")) self.assertFalse(admin.registerSchool("René Descartes"))
def testGetLog(self): admin = Admin("../../logs/log.txt") self.assertEqual(admin.getLog(),'testlog\ntestlog2')
def testGetSchoolsNameList(self): admin = Admin("") self.assertEqual(admin.getSchoolsNameList(),[u'Escola Santa Clara', u'Ren\xe9 Descartes'])
def testRemoveSchool(self): admin = Admin("") admin.registerSchool("TESTSCHOOL") self.assertTrue(admin.removeSchool("TESTSCHOOL"))
def testGetSchoolPassword(self): admin = Admin("") self.assertEqual(admin.getSchoolPassword('Escola Santa Clara'),"12345") self.assertNotEqual(admin.getSchoolPassword('Escola Santa Clara'),"1234")