Skip to content

Commit

Permalink
🧪 test: adicionando o teste para o endpoint LICITACOES_VALORES_ANUAIS
Browse files Browse the repository at this point in the history
  • Loading branch information
thaleseuflauzino committed Aug 12, 2024
1 parent 0c5d722 commit 60d6e2f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions backend/server/app/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@ def test_licitacoes_valores_mensais_vazio(self):
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data, [])

# TESTE DO ENDPOINT LICITACOES_VALORES_ANUAIS
def test_licitacoes_valores_anuais(self):
response = self.client.get(reverse('valores-anuais-list'))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data, [
{'ano': 2023, 'valor_total': 30000},
{'ano': 2024, 'valor_total': 0}
])

def test_licitacoes_valores_anuais_vazio(self):
LicitacaoValoresMensal.objects.all().delete()
response = self.client.get(reverse('valores-anuais-list'))
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.data, [])

# TESTE DO ENDPOINT LICITACAO_MAIOR_VALOR
def test_licitacao_maior_valor(self):
# Fazer uma requisição GET para o endpoint
Expand Down

0 comments on commit 60d6e2f

Please sign in to comment.