home · contact · privacy
Refactor request handler delete or retrieving items on POST.
[plomtask] / tests / conditions.py
index e488f34e7507b013234740eab6e1b59c87c52781..25a044fe88d87019334a70a9befd18c8e60818da 100644 (file)
@@ -51,6 +51,7 @@ class TestsWithServer(TestCaseWithServer):
         self.check_post(post, '/condition', 302, '/condition?id=1')
         # … single /condition
         cond = self.cond_as_dict(titles=['foo'], descriptions=['oof'])
+        assert isinstance(cond['_versioned'], dict)
         expected_single: dict[str, object]
         expected_single = {'is_new': False,
                            'enabled_processes': [],
@@ -72,7 +73,6 @@ class TestsWithServer(TestCaseWithServer):
         # test effect of POST changing title and activeness
         post = {'title': 'bar', 'description': 'oof', 'is_active': True}
         self.check_post(post, '/condition?id=1', 302)
-        assert isinstance(cond['_versioned'], dict)
         cond['_versioned']['title'][1] = 'bar'
         cond['is_active'] = True
         self.check_json_get('/condition?id=1', expected_single)