fix: dash in identifiers
This commit is contained in:
parent
3ec1942b4e
commit
2acfcc871f
3 changed files with 8 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
import yaml
|
||||
|
||||
from karl.services import Passwords
|
||||
from karl.services.mo import Mo
|
||||
|
|
@ -31,11 +30,10 @@ def test1_content(target_path: Path):
|
|||
content = target_path.read_text()
|
||||
assert '${' not in content
|
||||
|
||||
|
||||
props = {}
|
||||
prop_lines = content.split('\n')
|
||||
for line in prop_lines:
|
||||
if len(line)> 1:
|
||||
if len(line) > 1 and not line.startswith("#"):
|
||||
splitted = line.split('=')
|
||||
props[splitted[0]] = splitted[1]
|
||||
# props = {prop[0]:prop[1] for prop in content.split('\n')}
|
||||
|
|
@ -54,6 +52,9 @@ class TestEnvParsing:
|
|||
def test_mixed(self, test1_content: dict):
|
||||
assert test1_content['mixed'] == 'nested_username'
|
||||
|
||||
def test_dashed(self, test1_content: dict):
|
||||
assert test1_content['dashed'] == 'dd-value'
|
||||
|
||||
def test_custom_field(self, test1_content: dict):
|
||||
assert test1_content['custom'] == 'custom_content'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue