e2e_tests/recipes/demo/tests_demo/runner_demo.py
2023-12-06 12:57:17 +01:00

24 lines
1.1 KiB
Python

from pytest_abra.runner import Runner, Test
class RunnerDemo(Runner):
"""Every env file has a corresponding runner class"""
env_type = "demo" # name of the test, used for logging / output naming
# this indicates that tests from RunnerDemo depend on the setup from RunnerAuthentik.
# RunnerDemo will only execute, when setup_authentik.py has finished successfully.
# For example, setup_authentik.py generates session states, that can be used as fixtures
# that can be loaded from fixtures_authentik.py
dependencies: list[str] = ["authentik"]
# todo: update these comments
# Filename of Demo setup. If defined, it will run 1st by executing pytest
# Filename of Demo test. This file contains unconditional tests that will be run in any
# case. If defined, it will run 2nd by executing pytest
# this list can hold many more tests from RunnerDemo that run conditional. The condition
# and the test file can be defined by creating a ConditionalTest instance:
# ConditionalTest(condition: Callable, test_file: str)
setups: list[Test] = []
tests: list[Test] = []
cleanups: list[Test] = []