def test_student_with_attributes(self): student = SchoolMemberFactory.make(kind="student", name="fer", age=23, id_num='002547') self.assertEqual(str(student), "Soy fer!, tengo 23 años y mi ID = 002547")
def test_student_with_incorrect_lenght_id(self): student = SchoolMemberFactory.make(kind="student", name="fer", age=23, id_num='2547') self.assertEqual(str(student), "Error! El tamaño del ID debe ser de 6 caracteres")
def test_student_attributes(self): student = SchoolMemberFactory.make("student", name="Simona", age=17, id_num="18316") self.assertEqual( str(student), "Soy el alumno Simona!, tengo 17 años y mi ID = 18316")
def test_visitor_creation(self): visitor = SchoolMemberFactory.make(kind="visitor", name="fer") self.assertEqual(str(visitor), "Soy fer!, tengo -1 años y mi ID = XXXXXX")
def test_teacher_creation(self): teacher = SchoolMemberFactory.make(kind="teacher", name="bar") self.assertEqual(str(teacher), "Soy bar!, tengo -1 años y mi ID = XXXXXX")
def test_invalid_with_multiple_case(self): with self.assertRaisesWithMessage(ValueError): SchoolMemberFactory.make("InVaLID", name="foo")
def test_invalid_type(self): with self.assertRaisesWithMessage(ValueError): SchoolMemberFactory.make("invalid", name="foo")
def test_invalid_with_multiple_case(self): invalid = SchoolMemberFactory.make("inVaLiD", name="bar") self.assertEqual(str(invalid), "Error! tipo 'inVaLiD' invalido!")
def test_invalid_with_multiple_case(self): invalid = SchoolMemberFactory.make(kind="inVaLiD", name="bar") self.assertEqual(str(invalid), "[Error]: 'inVaLiD' invalid kind")
def test_invalid_with_multiple_case(self): invalid = SchoolMemberFactory.make("inVaLiD", name="Oracle") self.assertEqual( str(invalid), "# ERROR # Esa fucion no es valida. intente: Student, Teacher, Coach." )
def test_invalid_type(self): invalid = SchoolMemberFactory.make("invalid", name="Joker") self.assertEqual( str(invalid), "# ERROR # Esa fucion no es valida. intente: Student, Teacher, Coach." )
def test_creation_with_multiple_case(self): teacher = SchoolMemberFactory.make("tEaCHer", name="Skull") self.assertEqual( str(teacher), "Soy el profesor Skull!, tengo 22 años y mi ID = 070KGP")
def test_coach_creation(self): coach = SchoolMemberFactory.make("coach", name="Noir") self.assertEqual(str(coach), "Soy el Coach Noir!, tengo 22 años y mi ID = 070KGP")
def test_teacher_creation(self): teacher = SchoolMemberFactory.make("teacher", name="Crow") self.assertEqual( str(teacher), "Soy el profesor Crow!, tengo 22 años y mi ID = 070KGP")
def test_director_creation(self): director = SchoolMemberFactory.make("director", name="Simon") self.assertEqual( str(director), "Soy el director Simon!, tengo -1 años y mi ID = XXXXXX")
def test_creation_with_multiple_case(self): teacher = SchoolMemberFactory.make(kind="tEaCHer", name="baz") self.assertEqual(str(teacher), "Soy baz!, tengo -1 años y mi ID = XXXXXX")
def test_invalid_type(self): invalid = SchoolMemberFactory.make(kind="invalid", name="foo") self.assertEqual(str(invalid), "[Error]: 'invalid' invalid kind")
def test_student_creation(self): student = SchoolMemberFactory.make("student", name="Panther") self.assertEqual( str(student), "Soy el estudiante Panther!, tengo 22 años y mi ID = 070KGP")
def test_janitor_creation(self): janitor = SchoolMemberFactory.make("Janitor", name="foo") self.assertEqual( str(janitor), "Soy el Janitor foo!, tengo -1 años y mi ID = XXXXXX")
def test_creation_no_name(self): teacher = SchoolMemberFactory.make("tEaCHer", age=22) self.assertEqual(str(teacher), "Soy el Teacher !, tengo 22 años y mi ID = XXXXXX")
def test_student_creation(self): student = SchoolMemberFactory.make(kind="student", name="foo") self.assertEqual(str(student), "Soy foo!, tengo -1 años y mi ID = XXXXXX")
def test_invalid_type(self): invalid = SchoolMemberFactory.make("invalid", name="foo") self.assertEqual(str(invalid), "Error! tipo 'invalid' invalido!")