Пример #1
0
 def testRegisterSchool(self):
     admin = Admin("")
     self.assertTrue(admin.registerSchool("René Descartes"))
     self.assertFalse(admin.registerSchool("René Descartes"))
Пример #2
0
 def testGetLog(self):
     admin = Admin("../../logs/log.txt")
     self.assertEqual(admin.getLog(),'testlog\ntestlog2')
Пример #3
0
 def testGetSchoolsNameList(self):
     admin = Admin("")
     self.assertEqual(admin.getSchoolsNameList(),[u'Escola Santa Clara', u'Ren\xe9 Descartes'])
Пример #4
0
 def testRemoveSchool(self):
     admin = Admin("")
     admin.registerSchool("TESTSCHOOL")
     self.assertTrue(admin.removeSchool("TESTSCHOOL"))
Пример #5
0
 def testGetSchoolPassword(self):
     admin = Admin("")
     self.assertEqual(admin.getSchoolPassword('Escola Santa Clara'),"12345")
     self.assertNotEqual(admin.getSchoolPassword('Escola Santa Clara'),"1234")