mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-22 22:12:53 +02:00
24 lines
501 B
Python
24 lines
501 B
Python
"""Test Models.news."""
|
|
|
|
|
|
from aki_prj23_transparenzregister.models.news import News
|
|
|
|
|
|
def test_to_dict() -> None:
|
|
"""Tests if the version tag is entered."""
|
|
news = News(
|
|
"4711",
|
|
"Economy collapses",
|
|
"2042",
|
|
"Toilet paper prices rising",
|
|
"https://www.google.com",
|
|
)
|
|
|
|
assert news.to_dict() == {
|
|
"id": news.id,
|
|
"title": news.title,
|
|
"date": news.date,
|
|
"text": news.text,
|
|
"source_url": news.source_url,
|
|
}
|