Implement test for EnvironmentApi()
This commit is contained in:
parent
6ede2528c2
commit
012a04115a
1 changed files with 11 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
from pathlib import Path
|
||||
import pytest as pt
|
||||
|
||||
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi
|
||||
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi, EnvironmentApi
|
||||
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
|
||||
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
||||
|
||||
|
@ -10,6 +10,16 @@ from .helper import Helper
|
|||
def change_test_dir( tmp_path: Path, monkeypatch: pt.MonkeyPatch):
|
||||
monkeypatch.chdir(tmp_path)
|
||||
|
||||
def test_environment_api():
|
||||
# init
|
||||
env_api = EnvironmentApi()
|
||||
key = "TEST_ENV_KEY"
|
||||
value = "data"
|
||||
env_api.set(key, value)
|
||||
|
||||
#test
|
||||
assert env_api.get(key) == value
|
||||
|
||||
def test_git_api(tmp_path: Path, monkeypatch: pt.MonkeyPatch):
|
||||
# init
|
||||
th = Helper()
|
||||
|
|
Loading…
Reference in a new issue