refactor: test_helper -> helper

merge-requests/12/head
Michael Jerger 1 year ago
parent c13b70150b
commit e31d86ab69

@ -1,11 +1,11 @@
import pytest import pytest
from pathlib import Path from pathlib import Path
from src.main.python.ddadevops.domain.common import ( from src.main.python.ddadevops.domain import (
DnsRecord, DnsRecord,
BuildType, BuildType,
C4k
) )
from src.main.python.ddadevops.domain.c4k import C4k from .helper import build_devops
from .test_helper import build_devops
def test_creation(): def test_creation():

@ -1,18 +1,16 @@
from pybuilder.core import Project from pybuilder.core import Project
from pathlib import Path from pathlib import Path
from src.main.python.ddadevops.domain.common import ( from src.main.python.ddadevops.domain import (
Validateable, Validateable,
DnsRecord, DnsRecord,
Devops, Devops,
BuildType, BuildType,
)
from src.main.python.ddadevops.domain import (
Version, Version,
ReleaseType, ReleaseType,
Release, Release,
) )
from src.main.python.ddadevops.domain.image import Image from src.main.python.ddadevops.domain.image import Image
from .test_helper import build_devops from .helper import build_devops
class MockValidateable(Validateable): class MockValidateable(Validateable):

@ -1,8 +1,8 @@
import pytest import pytest
from .test_helper import build_devops from src.main.python.ddadevops.domain import (
from src.main.python.ddadevops.domain.common import (
Devops, Devops,
) )
from .helper import build_devops
def test_devops_buildpath(): def test_devops_buildpath():
sut = build_devops({'module': "cloud", 'name': "meissa"}) sut = build_devops({'module': "cloud", 'name': "meissa"})

@ -1,9 +1,9 @@
from pybuilder.core import Project from pybuilder.core import Project
from pathlib import Path from pathlib import Path
from src.main.python.ddadevops.domain.common import ( from src.main.python.ddadevops.domain import (
BuildType, BuildType,
) )
from .test_helper import build_devops from .helper import build_devops
def test_devops_build_commons_path(): def test_devops_build_commons_path():

@ -5,7 +5,7 @@ from src.main.python.ddadevops.domain import (
Version, Version,
MixinType, MixinType,
) )
from .test_helper import BuildFileRepositoryMock, devops_config from .helper import BuildFileRepositoryMock, devops_config
def test_sould_load_build_file(): def test_sould_load_build_file():

@ -1,19 +1,17 @@
from pybuilder.core import Project from pybuilder.core import Project
from pathlib import Path from pathlib import Path
from src.main.python.ddadevops.domain.common import ( from src.main.python.ddadevops.domain import (
Validateable, Validateable,
DnsRecord, DnsRecord,
Devops, Devops,
BuildType, BuildType,
MixinType, MixinType,
)
from src.main.python.ddadevops.domain import (
Version, Version,
ReleaseType, ReleaseType,
Release, Release,
Image,
) )
from src.main.python.ddadevops.domain.image import Image from .helper import build_devops, devops_config
from .test_helper import build_devops, devops_config
def test_sould_validate_release(): def test_sould_validate_release():

@ -3,9 +3,9 @@ from pathlib import Path
from src.main.python.ddadevops.domain import ( from src.main.python.ddadevops.domain import (
Version, Version,
ReleaseType, ReleaseType,
Image,
) )
from src.main.python.ddadevops.domain.image import Image from .helper import build_devops, devops_config
from .test_helper import build_devops, devops_config
def test_version_creation(): def test_version_creation():
@ -63,6 +63,7 @@ def test_should_create_patch():
assert sut.to_string() == "1.2.4" assert sut.to_string() == "1.2.4"
assert version.to_string() == "1.2.3" assert version.to_string() == "1.2.3"
def test_should_create_minor(): def test_should_create_minor():
version = Version.from_str("1.2.3-SNAPSHOT") version = Version.from_str("1.2.3-SNAPSHOT")
sut = version.create_minor() sut = version.create_minor()
@ -98,6 +99,7 @@ def test_should_create_major():
sut = version.create_major() sut = version.create_major()
assert sut.to_string() == "2.0.0" assert sut.to_string() == "2.0.0"
def test_should_create_bump(): def test_should_create_bump():
version = Version.from_str("1.2.3-SNAPSHOT") version = Version.from_str("1.2.3-SNAPSHOT")
sut = version.create_bump() sut = version.create_bump()

Loading…
Cancel
Save