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