X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=tests%2Fprocesses.py;h=578d545a9d1004c53121a2f2b785b434e791856d;hb=a58f0f088ef7bed064a7752aeebb03498b692e8b;hp=160442b287a08733ac6c4546ec77e696216ca4f7;hpb=5afb47e3aaed921997d11abf88a81602700639f3;p=plomtask diff --git a/tests/processes.py b/tests/processes.py index 160442b..578d545 100644 --- a/tests/processes.py +++ b/tests/processes.py @@ -24,6 +24,7 @@ class TestsSansDBProcessStep(TestCaseSansDB): class TestsWithDB(TestCaseWithDB): """Module tests requiring DB setup.""" checked_class = Process + test_versioneds = {'title': str, 'description': str, 'effort': float} def three_processes(self) -> tuple[Process, Process, Process]: """Return three saved processes.""" @@ -54,13 +55,8 @@ class TestsWithDB(TestCaseWithDB): p.save(self.db_conn) return p, set_1, set_2, set_3 - def test_Process_saving_and_caching(self) -> None: + def test_Process_conditions_saving(self) -> None: """Test .save/.save_core.""" - kwargs = {'id_': 1} - self.check_saving_and_caching(**kwargs) - self.check_saving_of_versioned('title', str) - self.check_saving_of_versioned('description', str) - self.check_saving_of_versioned('effort', float) p, set1, set2, set3 = self.p_of_conditions() p.uncache() r = Process.by_id(self.db_conn, p.id_) @@ -193,14 +189,8 @@ class TestsWithDB(TestCaseWithDB): class TestsWithDBForProcessStep(TestCaseWithDB): """Module tests requiring DB setup.""" checked_class = ProcessStep - - def test_ProcessStep_saving_and_caching(self) -> None: - """Test .save/.save_core.""" - kwargs = {'id_': 1, - 'owner_id': 2, - 'step_process_id': 3, - 'parent_step_id': 4} - self.check_saving_and_caching(**kwargs) + default_init_kwargs = {'owner_id': 2, 'step_process_id': 3, + 'parent_step_id': 4} def test_ProcessStep_from_table_row(self) -> None: """Test .from_table_row() properly reads in class from DB"""