|
|
@ -2,6 +2,7 @@ from behave import fixture, use_fixture
|
|
|
|
from injector import Injector
|
|
|
|
from injector import Injector
|
|
|
|
from typer.testing import CliRunner
|
|
|
|
from typer.testing import CliRunner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from features.support import DataSeeds
|
|
|
|
from tui_rsync.core.components.backup_plan.application.repository.backup_plan_repository import BackupPlanRepository
|
|
|
|
from tui_rsync.core.components.backup_plan.application.repository.backup_plan_repository import BackupPlanRepository
|
|
|
|
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
|
|
|
|
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
|
|
|
|
from tui_rsync.infrastructure.configuration import TestingConfiguration, CurrentConfiguration
|
|
|
|
from tui_rsync.infrastructure.configuration import TestingConfiguration, CurrentConfiguration
|
|
|
@ -40,6 +41,13 @@ def setup_injector_for_testing(context):
|
|
|
|
yield context.injector
|
|
|
|
yield context.injector
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@fixture
|
|
|
|
|
|
|
|
def setup_seeds(context):
|
|
|
|
|
|
|
|
context.data_seeds = DataSeeds(context.injector)
|
|
|
|
|
|
|
|
context.data_seeds.seeds(context)
|
|
|
|
|
|
|
|
yield context.data_seeds
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def before_tag(context, tag):
|
|
|
|
def before_tag(context, tag):
|
|
|
|
if tag == "fixture.injector":
|
|
|
|
if tag == "fixture.injector":
|
|
|
|
use_fixture(setup_injector_for_testing, context)
|
|
|
|
use_fixture(setup_injector_for_testing, context)
|
|
|
@ -50,3 +58,5 @@ def before_tag(context, tag):
|
|
|
|
if tag == "fixture.cli":
|
|
|
|
if tag == "fixture.cli":
|
|
|
|
use_fixture(setup_cli_app, context)
|
|
|
|
use_fixture(setup_cli_app, context)
|
|
|
|
use_fixture(setup_cli_runner, context)
|
|
|
|
use_fixture(setup_cli_runner, context)
|
|
|
|
|
|
|
|
if tag == "fixture.seeds":
|
|
|
|
|
|
|
|
use_fixture(setup_seeds, context)
|
|
|
|