21 lines
556 B
Python
21 lines
556 B
Python
import os
|
|
from pathlib import Path
|
|
from unittest import TestCase
|
|
|
|
from app.services import Passwords
|
|
from app.services.mo import Mo
|
|
|
|
|
|
class TestMo(TestCase):
|
|
def test_process(self):
|
|
mo = Mo(Passwords())
|
|
mo.process(Path('tests/files/test1/test.mo.yaml').absolute())
|
|
self.assertTrue(os.path.exists('tests/files/test1/test.mo'))
|
|
with open('tests/files/test1/test.mo', 'r') as f:
|
|
content = f.read()
|
|
self.assertFalse(content.__contains__('${'))
|
|
"""
|
|
value: some_oass
|
|
nested: nested_pass
|
|
custom: custom_content
|
|
"""
|