Turn test helper into class and rename
This commit is contained in:
parent
f49b44f5e0
commit
e4996dfb20
2 changed files with 13 additions and 10 deletions
13
src/main/python/ddadevops/release-mixin/test/helper.py
Normal file
13
src/main/python/ddadevops/release-mixin/test/helper.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from pathlib import Path
|
||||
from infrastructure_api import SystemAPI
|
||||
|
||||
|
||||
class Helper():
|
||||
def __init__(self, file_name = 'config.json'):
|
||||
self.TEST_FILE_NAME = file_name
|
||||
self.TEST_FILE_ROOT = Path('test/resources/')
|
||||
self.TEST_FILE_PATH = self.TEST_FILE_ROOT / self.TEST_FILE_NAME
|
||||
|
||||
def copy_files(self, source: Path, target: Path):
|
||||
api = SystemAPI()
|
||||
api.run_checked('cp', source, target)
|
|
@ -1,10 +0,0 @@
|
|||
from pathlib import Path
|
||||
from infrastructure_api import SystemAPI
|
||||
|
||||
TEST_FILE_NAME = 'config.json'
|
||||
TEST_FILE_ROOT = Path('test/resources/')
|
||||
TEST_FILE_PATH = TEST_FILE_ROOT / TEST_FILE_NAME
|
||||
|
||||
def copy_files(source: Path, target: Path):
|
||||
api = SystemAPI()
|
||||
api.run_checked('cp', source, target)
|
Loading…
Reference in a new issue