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