home · contact · privacy
Refactor tests.
[plomtask] / tests / processes.py
index 9e769c1e3da6acafa81b3d529d040aba4a5c5251..160442b287a08733ac6c4546ec77e696216ca4f7 100644 (file)
@@ -9,26 +9,16 @@ from plomtask.todos import Todo
 class TestsSansDB(TestCaseSansDB):
     """Module tests not requiring DB setup."""
     checked_class = Process
-
-    def test_Process_id_setting(self) -> None:
-        """Test .id_ being set and its legal range being enforced."""
-        self.check_id_setting()
-
-    def test_Process_versioned_defaults(self) -> None:
-        """Test defaults of VersionedAttributes."""
-        self.check_versioned_defaults({
-            'title': 'UNNAMED',
-            'description': '',
-            'effort': 1.0})
+    do_id_test = True
+    versioned_defaults_to_test = {'title': 'UNNAMED', 'description': '',
+                                  'effort': 1.0}
 
 
 class TestsSansDBProcessStep(TestCaseSansDB):
     """Module tests not requiring DB setup."""
     checked_class = ProcessStep
-
-    def test_ProcessStep_id_setting(self) -> None:
-        """Test .id_ being set and its legal range being enforced."""
-        self.check_id_setting(2, 3, 4)
+    do_id_test = True
+    default_init_args = [2, 3, 4]
 
 
 class TestsWithDB(TestCaseWithDB):