1
0
secret_loader/test/test_init.py

11 lines
289 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():
2024-06-12 21:36:32 +00:00
loader = secret_loader.SecretLoader('TEST', hardcoded={'KEY': 'VALUE'})
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('TEST', hardcoded={})
assert loader.load('UNKNOWN') is None