Skip to content

Commit

Permalink
Atualiza testes
Browse files Browse the repository at this point in the history
  • Loading branch information
nYCSTs committed Nov 26, 2023
1 parent 8ec89ec commit 939a34f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_schedule.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
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)

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' }
Expand Down

0 comments on commit 939a34f

Please sign in to comment.