From 81458c6acc6fa058cea79d8ca7dc9538d730153c Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 2 Mar 2023 18:16:03 +0100 Subject: [PATCH] dd todos from review --- release_mixin.py | 4 ++-- test/test_infrastructure_api.py | 3 +-- test/test_services.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/release_mixin.py b/release_mixin.py index 06648e7..03f3c99 100644 --- a/release_mixin.py +++ b/release_mixin.py @@ -22,13 +22,13 @@ def add_versions(config, release_version, bump_version) -> dict: class ReleaseMixin(DevopsBuild): - def __init__(self, project, config): + def __init__(self, project, config): # todo: create services in init, dont expose repos etc in api super().__init__(project, config) release_mixin_config = config['ReleaseMixin'] self.config_file = release_mixin_config['config_file'] self.main_branch = release_mixin_config['main_branch'] self.git_api = GitApi() - self.release_type_repo = ReleaseTypeRepository(self.git_api) + self.release_type_repo = ReleaseTypeRepository(self.git_api) # maybe get from env? self.version_repo = VersionRepository(self.config_file) self.release_repo = ReleaseRepository(self.version_repo, self.release_type_repo, self.main_branch) diff --git a/test/test_infrastructure_api.py b/test/test_infrastructure_api.py index 6d681da..d914d32 100644 --- a/test/test_infrastructure_api.py +++ b/test/test_infrastructure_api.py @@ -17,5 +17,4 @@ sys.path.append(parent) # now we can import the module in the parent # directory. -from infrastructure_api import GitApi - +from infrastructure_api import GitApi # todo: implement from services example diff --git a/test/test_services.py b/test/test_services.py index 3bcf1b0..4b3926c 100644 --- a/test/test_services.py +++ b/test/test_services.py @@ -25,7 +25,7 @@ from infrastructure_api import GitApi def change_test_dir( tmp_path: Path, monkeypatch: pt.MonkeyPatch): monkeypatch.chdir(tmp_path) -def test_prepare_release_service(tmp_path: Path, monkeypatch: pt.MonkeyPatch): +def test_prepare_release_service(tmp_path: Path, monkeypatch: pt.MonkeyPatch): # todo: maybe use mocks for service api tests # init file_name = 'config.json' with open(f'test/resources/{file_name}', 'r') as json_file: