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-07-07 22:00:50 +00:00
|
|
|
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():
|
2024-07-07 22:00:50 +00:00
|
|
|
loader = secret_loader.SecretLoader()
|
2024-07-07 21:36:58 +00:00
|
|
|
assert loader.load('UNKNOWN') is None
|