Alexander Hess
54ff377579
- reorganize `urban_meal_delivery.console` into a sub-package - move `tests.db.conftest` fixtures into `tests.conftest` => some integration tests regarding CLI scripts need a database - add `urban_meal_delivery.console.decorators.db_revision` decorator to ensure the database is at a certain state before a CLI script runs - refactor the `urban_meal_delivery.db.grids.Grid.gridify()` constructor: - bug fix: even empty `Pixel`s end up in the database temporarily => create `Pixel` objects only if an `Address` is to be assigned to it - streamline code and docstring - add further test cases
10 lines
240 B
Python
10 lines
240 B
Python
"""Fixture for testing the CLI scripts."""
|
|
|
|
import pytest
|
|
from click import testing as click_testing
|
|
|
|
|
|
@pytest.fixture
|
|
def cli() -> click_testing.CliRunner:
|
|
"""Initialize Click's CLI Test Runner."""
|
|
return click_testing.CliRunner()
|