Import local files instead of modules of the same name
These modules don't exist and caused our tests to fail
This commit is contained in:
parent
7ba7cce801
commit
162815b5ba
5 changed files with 12 additions and 8 deletions
|
@ -1,7 +1,8 @@
|
||||||
from mock_domain import MockRelease, MockVersion
|
|
||||||
from mock_infrastructure_api import MockGitApi
|
|
||||||
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
||||||
|
|
||||||
|
from .mock_domain import MockRelease, MockVersion
|
||||||
|
from .mock_infrastructure_api import MockGitApi
|
||||||
|
|
||||||
class MockVersionRepository():
|
class MockVersionRepository():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure import ReleaseTypeRepository, VersionRepository, ReleaseRepository
|
from src.main.python.ddadevops.release_mixin.infrastructure import ReleaseTypeRepository, VersionRepository, ReleaseRepository
|
||||||
from mock_infrastructure_api import MockGitApi
|
from .mock_infrastructure_api import MockGitApi
|
||||||
from helper import Helper
|
from .helper import Helper
|
||||||
|
|
||||||
def test_version_repository(tmp_path):
|
def test_version_repository(tmp_path):
|
||||||
# init
|
# init
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from helper import Helper
|
|
||||||
import pytest as pt
|
import pytest as pt
|
||||||
|
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi
|
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
|
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
|
||||||
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
||||||
|
|
||||||
|
from .helper import Helper
|
||||||
|
|
||||||
def change_test_dir( tmp_path: Path, monkeypatch: pt.MonkeyPatch):
|
def change_test_dir( tmp_path: Path, monkeypatch: pt.MonkeyPatch):
|
||||||
monkeypatch.chdir(tmp_path)
|
monkeypatch.chdir(tmp_path)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import pytest as pt
|
import pytest as pt
|
||||||
from helper import Helper
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from ddadevops import *
|
from ddadevops import *
|
||||||
from pybuilder.core import Project
|
from pybuilder.core import Project
|
||||||
|
@ -7,6 +6,8 @@ from pybuilder.core import Project
|
||||||
from src.main.python.ddadevops.release_mixin.release_mixin import ReleaseMixin, create_release_mixin_config
|
from src.main.python.ddadevops.release_mixin.release_mixin import ReleaseMixin, create_release_mixin_config
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi
|
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi
|
||||||
|
|
||||||
|
from .helper import Helper
|
||||||
|
|
||||||
MAIN_BRANCH = 'main'
|
MAIN_BRANCH = 'main'
|
||||||
STAGE = 'test'
|
STAGE = 'test'
|
||||||
PROJECT_ROOT_PATH = '.'
|
PROJECT_ROOT_PATH = '.'
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from src.main.python.ddadevops.release_mixin.services import PrepareReleaseService, TagAndPushReleaseService
|
from src.main.python.ddadevops.release_mixin.services import PrepareReleaseService, TagAndPushReleaseService
|
||||||
from mock_infrastructure import MockReleaseRepository, MockReleaseTypeRepository, MockVersionRepository
|
|
||||||
from mock_infrastructure_api import MockGitApi
|
from .mock_infrastructure import MockReleaseRepository, MockReleaseTypeRepository, MockVersionRepository
|
||||||
|
from .mock_infrastructure_api import MockGitApi
|
||||||
|
|
||||||
def test_prepare_release_service(): # todo: maybe use mocks for service api tests
|
def test_prepare_release_service(): # todo: maybe use mocks for service api tests
|
||||||
# init
|
# init
|
||||||
|
|
Loading…
Reference in a new issue