X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=tests%2Fconditions.py;fp=tests%2Fconditions.py;h=198df5f70bbf28618558967cdccdd52f8224e007;hb=c01144241aec26aa6b8fc8c2a6e9bb90136b96c9;hp=7fdd4d44823d5b80b5a788267f82d26a8c53fa12;hpb=0ccae4d00a38cc04c41cd0ee68e2aed896144fce;p=plomtask diff --git a/tests/conditions.py b/tests/conditions.py index 7fdd4d4..198df5f 100644 --- a/tests/conditions.py +++ b/tests/conditions.py @@ -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