Use pip instead of Poetry

This commit is contained in:
Joakim Hellsén 2024-06-27 00:30:39 +02:00
commit d23f364f71
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
8 changed files with 46 additions and 1760 deletions

0
tests/__init__.py Normal file
View file

23
tests/views_test.py Normal file
View file

@ -0,0 +1,23 @@
from typing import TYPE_CHECKING
from fastapi.testclient import TestClient
from app.main import app
if TYPE_CHECKING:
from httpx import Response
client = TestClient(app)
def test_read_main() -> None:
"""Test the main page."""
# Send a GET request to the app
response: Response = client.get("/")
# Check if the response status code is 200 OK
assert response.status_code == 200
# Check if the response contains the expected text
html_text = '<a href="https://en.wikipedia.org/wiki/Web_feed">web feeds</a>.'
assert html_text in response.text