Philipp Horstenkamp 01b4ce00c1
Spellchecking with PyCharm (#133)
Co-authored-by: KM-R <129882581+KM-R@users.noreply.github.com>
2023-10-02 20:47:42 +02:00

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,
}