1
0
secret_loader/test/test_init.py

12 lines
324 B
Python
Raw Normal View History

2024-06-12 21:02:31 +00:00
import secret_loader
2024-06-12 21:36:32 +00:00
2024-06-12 21:02:31 +00:00
def test_init():
loader = secret_loader.SecretLoader(ENV_KEY_PREFIX = 'TEST', KEY = 'VALUE')
assert loader.load('ENV_KEY_PREFIX') == 'TEST'
2024-06-12 21:36:21 +00:00
assert loader.load('KEY') == 'VALUE'
2024-07-07 21:36:58 +00:00
def test_lookup_unknown():
loader = secret_loader.SecretLoader()
2024-07-07 21:36:58 +00:00
assert loader.load('UNKNOWN') is None