refactor: test_helper -> helper

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

@ -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():

@ -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):

@ -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"})

@ -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():

@ -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():

@ -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():

@ -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"
assert sut.to_string() == "1.0.1-SNAPSHOT"

Loading…
Cancel
Save