Exemple #1
0
    def test_should_not_create_same_campus(self):
        new_campus = Campus()
        new_campus.name = "Campus da Faculdade Gama"
        new_campus.acronym = "FGA"
        new_campus.phone = "(61) 3333-3333"
        new_campus.address = "Setor Leste - Gama"
        new_campus.website_address = "https://fga.unb.br/"

        with self.assertRaises(ValidationError):
            new_campus.save()
Exemple #2
0
    def test_should_not_create_without_address(self):
        new_campus = Campus()
        new_campus.name = "Facul Gama"
        new_campus.acronym = "FGa"
        new_campus.phone = "(61) 3333-3333"
        new_campus.website_address = "https://fga.unb.br/"

        with self.assertRaises(ValidationError):
            new_campus.save()
Exemple #3
0
    def test_should_not_create_same_campus(self):
        new_campus = Campus()
        new_campus.name = "Campus da Faculdade Gama"
        new_campus.acronym = "FGA"

        with self.assertRaises(ValidationError):
            new_campus.save()
Exemple #4
0
    def test_should_not_create_without_acronym(self):
        new_campus = Campus()
        new_campus.name = "Facul Gama"

        with self.assertRaises(ValidationError):
            new_campus.save()
Exemple #5
0
    def test_should_not_create_without_name(self):
        new_campus = Campus()
        new_campus.acronym = "FGa"

        with self.assertRaises(ValidationError):
            new_campus.save()