home · contact · privacy
Add Todo/Process.blockers for Conditions that block rather than enable.
[plomtask] / tests / days.py
index 1f0e55d871b282881dc0fee2f7e2fc91a591d243..9e12d3ff665550f3fb23bb603e639ce8efbf60ff 100644 (file)
@@ -42,8 +42,12 @@ class TestsWithDB(TestCaseWithDB):
     checked_class = Day
     default_ids = ('2024-01-01', '2024-01-02', '2024-01-03')
 
-    def test_Day_saving_and_caching(self) -> None:
-        """Test .save/.save_core."""
+    def test_saving_and_caching(self) -> None:
+        """Test storage of instances.
+
+        We don't use the parent class's method here because the checked class
+        has too different a handling of IDs.
+        """
         kwargs = {'date': self.default_ids[0], 'comment': 'foo'}
         self.check_saving_and_caching(**kwargs)
 
@@ -96,7 +100,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 +119,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)