X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance?a=blobdiff_plain;f=tests%2Fprocesses.py;h=70090d15c5f9e8e49c5f64187f750d29d9d2d638;hb=02aa60b59cea2c0401efd785f3bb5d06aec7bf4d;hp=34f6427e4d06152a17f035672061757cce203cac;hpb=c5449a0b00f8865b1129ed56bdd16f1cc055bc87;p=plomtask diff --git a/tests/processes.py b/tests/processes.py index 34f6427..70090d1 100644 --- a/tests/processes.py +++ b/tests/processes.py @@ -63,9 +63,9 @@ class TestsWithDB(TestCaseWithDB): self.assertEqual(sorted(r.enables), sorted(set2)) self.assertEqual(sorted(r.disables), sorted(set3)) - def test_Process_from_table_row(self) -> None: + def test_from_table_row(self) -> None: """Test .from_table_row() properly reads in class from DB""" - self.check_from_table_row() + super().test_from_table_row() self.check_versioned_from_table_row('title', str) self.check_versioned_from_table_row('description', str) self.check_versioned_from_table_row('effort', float) @@ -190,10 +190,6 @@ class TestsWithDB(TestCaseWithDB): """Test .all().""" self.check_all() - def test_Process_singularity(self) -> None: - """Test pointers made for single object keep pointing to it.""" - self.check_singularity('conditions', [Condition(None)]) - def test_Process_versioned_attributes_singularity(self) -> None: """Test behavior of VersionedAttributes on saving (with .title).""" self.check_versioned_singularity() @@ -279,7 +275,8 @@ class TestsWithServer(TestCaseWithServer): form_data = {'title': 'foo', 'description': 'foo', 'effort': 1.0} self.post_process(2, form_data | {'condition': []}) self.check_post(form_data | {'condition': [1]}, '/process?id=', 404) - self.check_post({'title': 'foo', 'description': 'foo'}, + self.check_post({'title': 'foo', 'description': 'foo', + 'is_active': False}, '/condition', 302, '/condition?id=1') self.post_process(3, form_data | {'condition': [1]}) self.post_process(4, form_data | {'disables': [1]})