Coverage for tests\test_fixture.py: 100%
7 statements
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-05 19:00 +0800
« prev ^ index » next coverage.py v7.1.0, created at 2023-02-05 19:00 +0800
1import pytest
3# Fixture is defined.
4from models.events import EventUpdate
7@pytest.fixture
8def event() -> EventUpdate:
9 return EventUpdate(
10 title="FastAPI Book Launch",
11 image="https://packt.com/fastapi.png",
12 description="We will be discussing the contents of the FastAPI book in this event.Ensure to come with your own copy to win gifts!",
13 tags=["python", "fastapi", "book", "launch"],
14 location="Google Meet"
15 )
18def test_event_name(event: EventUpdate) -> None:
19 assert event.title == "FastAPI Book Launch"