X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=tests%2Fdays.py;h=41bcf9ce11a7db458ed5c03ce2b3f3abf9150722;hb=f8118b1ed8615870b490566cf649d191f5877932;hp=c143f985b22b7bdd41d65e21409c2016274de54c;hpb=f8148a40996d64878431ac59d47650741e1d79c5;p=plomtask diff --git a/tests/days.py b/tests/days.py index c143f98..41bcf9c 100644 --- a/tests/days.py +++ b/tests/days.py @@ -44,12 +44,12 @@ class TestsWithDB(TestCaseWithDB): def test_Day_saving_and_caching(self) -> None: """Test .save/.save_core.""" - kwargs = {'date': '2024-01-01', 'comment': 'foo'} + kwargs = {'date': self.default_ids[0], 'comment': 'foo'} self.check_saving_and_caching(**kwargs) def test_Day_from_table_row(self) -> None: """Test .from_table_row() properly reads in class from DB""" - self.check_from_table_row('2024-01-01') + self.check_from_table_row() def test_Day_by_id(self) -> None: """Test .by_id().""" @@ -96,7 +96,7 @@ class TestsWithDB(TestCaseWithDB): def test_Day_singularity(self) -> None: """Test pointers made for single object keep pointing to it.""" - self.check_singularity('comment', 'boo') + self.check_singularity('day_comment', 'boo') class TestsWithServer(TestCaseWithServer): @@ -115,7 +115,7 @@ class TestsWithServer(TestCaseWithServer): def test_do_POST_day(self) -> None: """Test POST /day.""" - form_data = {'comment': ''} + form_data = {'day_comment': ''} self.check_post(form_data, '/day', 400) self.check_post(form_data, '/day?date=foo', 400) self.check_post(form_data, '/day?date=2024-01-01', 302)