mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-22 11:42:55 +02:00
24 lines
502 B
Python
24 lines
502 B
Python
"""Test Models.nesws."""
|
|
|
|
|
|
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,
|
|
}
|