dda-devops-build/src/main/python/ddadevops/release-mixin/test/mock_domain.py

48 lines
1.1 KiB
Python
Raw Normal View History

2023-03-03 13:31:51 +01:00
import os
import sys
current = os.path.dirname(os.path.realpath(__file__))
parent = os.path.dirname(current)
sys.path.append(parent)
from domain import ReleaseType
class MockVersion():
def __init__(self, id = None, version_list = None):
self.id = None
self.version_list = None
self.version_string = None
self.is_snapshot = None
def increment(self, release_type: ReleaseType):
pass
def get_version_string(self) -> str:
return ""
def create_release_version(self, release_type: ReleaseType):
return MockVersion()
def create_bump_version(self):
return MockVersion()
class MockRelease():
def __init__(self, release_type, version, current_branch):
self.release_type = release_type
self.version = version
self.current_branch = current_branch
def release_version(self):
return MockVersion()
def bump_version(self):
return MockVersion()
def validate(self, main_branch):
self.validate_count =+ 1
return self.is_valid
def is_valid(self, main_branch):
return True