From 939a34fa867c1b066b24e434c7918b8a7dfadc4b Mon Sep 17 00:00:00 2001 From: lcsAndrade Date: Sun, 26 Nov 2023 14:06:41 -0300 Subject: [PATCH] Atualiza testes --- tests/test_schedule.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_schedule.py b/tests/test_schedule.py index e45753b..7482fbf 100644 --- a/tests/test_schedule.py +++ b/tests/test_schedule.py @@ -1,8 +1,10 @@ import pytest from fastapi.testclient import TestClient +from datetime import datetime from src.main import app from src.constants import errorMessages +from src.utils import enumeration client = TestClient(app) @@ -10,9 +12,9 @@ class TestSchedule: def test_schedule_get_schedule_day(self): response = client.get("/api/schedule/") data = response.json() + week_dt_str = [i.value for i in enumeration.ScheduleDaysEnum][datetime.now().weekday()] assert response.status_code == 200 - assert len(list(data.keys())) == 7 - assert all([a == b for a, b in zip(list(data.keys()), ['SEGUNDA', 'TERCA', 'QUARTA', 'QUINTA', 'SEXTA', 'SABADO', 'DOMINGO'])]) + assert week_dt_str in data.keys() def test_schedule_get_schedule_specific_day_invalid(self): params = { 'day': 'INVALID' }