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."""
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_)
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"""