Use mocking for TestModeOfTransportDistributionManager, separate testing of validator #41
Labels
good first issue
Good for newcomers
technical-debt
This increases the code quality without changing the functionality
The DatabaseChooser at https://github.com/1kastner/conflowgen/blob/main/conflowgen/tests/api/test_database_chooser.py is a good example of how to do mocking correct. In the API package, we only want to check whether the API class does its work. The used class instances etc. should not really be invoked. For those, we have other unit tests.
The test https://github.com/1kastner/conflowgen/blob/main/conflowgen/tests/api/test_mode_of_transport_distribution_manager.py is a bad example because the unit test does not isolate the ModeOfTransportDistributionManager. The validator which is currently tested here and which resides in https://github.com/1kastner/conflowgen/tree/main/conflowgen/domain_models/distribution_validators should get its own test at https://github.com/1kastner/conflowgen/tree/main/conflowgen/tests/domain_models.
The text was updated successfully, but these errors were encountered: