def test_member_invalid_mail(self):
        student = Student()
        student.name = STUDENT_NAME
        student.student_id = STUDENT_ID
        student.email = STUDENT_INVALID_EMAIL

        with self.assertRaises(ValidationError):
            student.full_clean()
    def test_member_valid_email(self):
        student = Student()
        student.name = STUDENT_NAME
        student.student_id = STUDENT_ID
        student.email = STUDENT_VALID_EMAIL

        student.full_clean()
        student.save()

        self.assertIsNotNone(student.pk)
        self.assertTrue(student.is_active())
    def test_member_remove(self):
        student = Student()
        student.name = STUDENT_NAME
        student.student_id = STUDENT_ID
        student.email = STUDENT_VALID_EMAIL

        student.full_clean()
        student.save()

        self.assertIsNotNone(student.pk)
        self.assertIsNone(student.date_removed)

        student.delete()

        self.assertIsNotNone(student.date_removed)