Philipp Horstenkamp 1eb972b7ff
Adds the transfer of sentiments into the sql db (#253)
Transfers the sentimenes from the mongodb int the sql db.
2023-10-24 17:50:40 +02:00

26 lines
555 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,
"sentiment": None,
"companies": None,
}