diff --git a/src/test/python/domain/test_helper.py b/src/test/python/domain/helper.py similarity index 100% rename from src/test/python/domain/test_helper.py rename to src/test/python/domain/helper.py diff --git a/src/test/python/domain/test_c4k.py b/src/test/python/domain/test_c4k.py index e9d14d9..bc69f1c 100644 --- a/src/test/python/domain/test_c4k.py +++ b/src/test/python/domain/test_c4k.py @@ -1,11 +1,11 @@ import pytest from pathlib import Path -from src.main.python.ddadevops.domain.common import ( +from src.main.python.ddadevops.domain import ( DnsRecord, BuildType, + C4k ) -from src.main.python.ddadevops.domain.c4k import C4k -from .test_helper import build_devops +from .helper import build_devops def test_creation(): diff --git a/src/test/python/domain/test_common.py b/src/test/python/domain/test_common.py index 5c9bc8a..ff606f1 100644 --- a/src/test/python/domain/test_common.py +++ b/src/test/python/domain/test_common.py @@ -1,18 +1,16 @@ from pybuilder.core import Project from pathlib import Path -from src.main.python.ddadevops.domain.common import ( +from src.main.python.ddadevops.domain import ( Validateable, DnsRecord, Devops, BuildType, -) -from src.main.python.ddadevops.domain import ( Version, ReleaseType, Release, ) from src.main.python.ddadevops.domain.image import Image -from .test_helper import build_devops +from .helper import build_devops class MockValidateable(Validateable): diff --git a/src/test/python/domain/test_devops.py b/src/test/python/domain/test_devops.py index 0a881ea..a7c081a 100644 --- a/src/test/python/domain/test_devops.py +++ b/src/test/python/domain/test_devops.py @@ -1,8 +1,8 @@ import pytest -from .test_helper import build_devops -from src.main.python.ddadevops.domain.common import ( +from src.main.python.ddadevops.domain import ( Devops, ) +from .helper import build_devops def test_devops_buildpath(): sut = build_devops({'module': "cloud", 'name': "meissa"}) diff --git a/src/test/python/domain/test_image.py b/src/test/python/domain/test_image.py index 61d3350..e26c98d 100644 --- a/src/test/python/domain/test_image.py +++ b/src/test/python/domain/test_image.py @@ -1,9 +1,9 @@ from pybuilder.core import Project from pathlib import Path -from src.main.python.ddadevops.domain.common import ( +from src.main.python.ddadevops.domain import ( BuildType, ) -from .test_helper import build_devops +from .helper import build_devops def test_devops_build_commons_path(): diff --git a/src/test/python/domain/test_init_service.py b/src/test/python/domain/test_init_service.py index d7e8ba0..5ae5c2a 100644 --- a/src/test/python/domain/test_init_service.py +++ b/src/test/python/domain/test_init_service.py @@ -5,7 +5,7 @@ from src.main.python.ddadevops.domain import ( Version, MixinType, ) -from .test_helper import BuildFileRepositoryMock, devops_config +from .helper import BuildFileRepositoryMock, devops_config def test_sould_load_build_file(): diff --git a/src/test/python/domain/test_release.py b/src/test/python/domain/test_release.py index 3fd4cf9..ec1ed9b 100644 --- a/src/test/python/domain/test_release.py +++ b/src/test/python/domain/test_release.py @@ -1,19 +1,17 @@ from pybuilder.core import Project from pathlib import Path -from src.main.python.ddadevops.domain.common import ( +from src.main.python.ddadevops.domain import ( Validateable, DnsRecord, Devops, BuildType, MixinType, -) -from src.main.python.ddadevops.domain import ( Version, ReleaseType, Release, + Image, ) -from src.main.python.ddadevops.domain.image import Image -from .test_helper import build_devops, devops_config +from .helper import build_devops, devops_config def test_sould_validate_release(): diff --git a/src/test/python/domain/test_version.py b/src/test/python/domain/test_version.py index 850fd7a..d601e67 100644 --- a/src/test/python/domain/test_version.py +++ b/src/test/python/domain/test_version.py @@ -3,9 +3,9 @@ from pathlib import Path from src.main.python.ddadevops.domain import ( Version, ReleaseType, + Image, ) -from src.main.python.ddadevops.domain.image import Image -from .test_helper import build_devops, devops_config +from .helper import build_devops, devops_config def test_version_creation(): @@ -63,6 +63,7 @@ def test_should_create_patch(): assert sut.to_string() == "1.2.4" assert version.to_string() == "1.2.3" + def test_should_create_minor(): version = Version.from_str("1.2.3-SNAPSHOT") sut = version.create_minor() @@ -98,6 +99,7 @@ def test_should_create_major(): sut = version.create_major() assert sut.to_string() == "2.0.0" + def test_should_create_bump(): version = Version.from_str("1.2.3-SNAPSHOT") sut = version.create_bump() @@ -109,4 +111,4 @@ def test_should_create_bump(): version = Version.from_str("1.0.0") sut = version.create_bump("SNAPSHOT") - assert sut.to_string() == "1.0.1-SNAPSHOT" \ No newline at end of file + assert sut.to_string() == "1.0.1-SNAPSHOT"