* make it so that the actual tests can be moved anywhere, for example in abra recipe repos -> major refactoring with pytest test discovery magic * create RUNNER_DICT dynamically with importlib -> none of the tests are hardcoded, more tests can be added by placing a folder * autoload fixtures with pytest plugins * add URL fixture to navigate on web pages. Includes url parser based on python urllib to generate correct links * fix nextcloud setups and tests * add email groundwork with imbox Reviewed-on: local-it-infrastructure/e2e_tests#7 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
26 lines
707 B
Python
26 lines
707 B
Python
"""
|
|
This file can be used to define fixtures thate are then used by other tests which
|
|
depend on [demo]. For this to work
|
|
|
|
1. the Runner class of the other test needs to define the depencency as seen
|
|
by referencing RunnerDemo in the dependencies list:
|
|
|
|
from abratest.tests_demo.runner_demo import RunnerDemo
|
|
|
|
class RunnerOther(Runner):
|
|
dependencies = [RunnerDemo]
|
|
|
|
|
|
2. the specific tests that rely on these fixtures need to import the fixtures.
|
|
To globally import for all tests in 'other', the import should be done in conftest:
|
|
|
|
in 'conftest.py' in 'test_other' dir:
|
|
from abratest.tests_demo.fixtures_demo import demo_fixture
|
|
"""
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def demo_fixture():
|
|
return ""
|