Turn test helper into class and rename

This commit is contained in:
erik 2023-03-09 13:25:25 +01:00
parent f49b44f5e0
commit e4996dfb20
2 changed files with 13 additions and 10 deletions

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

View file

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