home · contact · privacy
Extend Days test to behavior of Conditions.
[plomtask] / tests / conditions.py
index 7fdd4d44823d5b80b5a788267f82d26a8c53fa12..198df5f70bbf28618558967cdccdd52f8224e007 100644 (file)
@@ -42,27 +42,6 @@ class TestsWithDB(TestCaseWithDB):
 class TestsWithServer(TestCaseWithServer):
     """Module tests against our HTTP server/handler (and database)."""
 
-    @staticmethod
-    def cond_as_dict(id_: int = 1,
-                     is_active: bool = False,
-                     titles: None | list[str] = None,
-                     descriptions: None | list[str] = None
-                     ) -> dict[str, object]:
-        """Return JSON of Condition to expect."""
-        d = {'id': id_,
-             'is_active': is_active,
-             '_versioned': {
-                 'title': {},
-                 'description': {}}}
-        titles = titles if titles else []
-        descriptions = descriptions if descriptions else []
-        assert isinstance(d['_versioned'], dict)
-        for i, title in enumerate(titles):
-            d['_versioned']['title'][i] = title
-        for i, description in enumerate(descriptions):
-            d['_versioned']['description'][i] = description
-        return d
-
     def test_do_POST_condition(self) -> None:
         """Test POST /condition and its effect on GET /condition[s]."""
         # check empty POST fails