Esempio n. 1
0
 def testEditableFunctionReturnTrueWhenIPutATextFile(self):
     filename = "file.txt"
     practice_file = PracticeFile()
     practice_file.file = filename
     self.assertTrue(practice_file.isEditable(), "Error is Editable")
Esempio n. 2
0
 def testEditableFunctionReturnFalseWhenIPutANotTextFile(self):
     filename = "file.pdf"
     practice_file = PracticeFile()
     practice_file.file = filename
     self.assertFalse(practice_file.isEditable(), "Error is Editable")
Esempio n. 3
0
 def testPracticeFileToStringReturnNamePutForTheTeacher(self):
     name = "Enunciado"
     practice_file = PracticeFile()
     practice_file.name = name
     self.assertEqual(str(practice_file), name)