Skip to content

Commit

Permalink
implementando teste UpdateArtifactView labens-ufrn#41
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelorai authored Dec 20, 2022
1 parent bf1541f commit 4650546
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions artifacts/tests/artifacts/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,14 @@ def test_model_content(self):
self.assertEqual(self.artifact.nome, 'Projeto teste')
self.assertEqual(self.response.status_code, 302)

class UpdateArtifactView(TestCase):

def setUp(self):
self.client=Client()
self.projeto=Projeto.objects.create(nome="Projeto teste", data_inicio='2022-01-01', data_termino='2022-12-31', situacao="Iniciado")
self.artifact=Artefato.objects.create(nome="Projeto teste", data_entrega='2022-01-01', situacao="Iniciado", projeto=self.projeto)
self.response=self.client.update(reverse_lazy('artifacts:update_artifact', kwargs={'pk':self.artifact.pk}))

def test_model_content(self):
self.assertEqual(self.artifact.nome, 'Projeto teste')
self.assertEqual(self.response.status_code, 302)

0 comments on commit 4650546

Please sign in to comment.