refactor: test_helper -> helper

This commit is contained in:
Michael Jerger 2023-05-13 16:09:03 +02:00
parent c13b70150b
commit e31d86ab69
8 changed files with 18 additions and 20 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

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

View file

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