Skip to content

Commit

Permalink
Updated unit test_queries
Browse files Browse the repository at this point in the history
Make codacy happy
  • Loading branch information
johausmann committed Oct 31, 2023
1 parent 8c75c7e commit 9e5f130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion covigator/dashboard/tabs/overview.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import dash_bootstrap_components as dbc
from dash import dcc
from dash import html
from dash import Input, Output, State, html
from covigator.database.queries import Queries
from covigator.dashboard.tabs import COLOR_STATUS, NEWS_PATTERN
Expand Down
4 changes: 4 additions & 0 deletions covigator/tests/unit_tests/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ def test_get_news(self):
NewsSection(message_text="bla3", message_type=NewsType.RELEASE.name),
NewsSection(message_text="bla4", message_type=NewsType.RELEASE.name)]
self.session.add_all(test_news_section)
self.session.commit()

news = self.queries.get_top_news()
self.assertEqual(news.shape[0], 3)
# Check that most recent news item returned as top element
self.assertTrue(news.message_text.loc[0] == "bla4")

0 comments on commit 9e5f130

Please sign in to comment.