CPI Ordering System (the old version)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

17 lines
616 B

def test_crypt_context_to_settings():
from ordr.security import crypt_context_settings_to_string
settings = {
'no_prefix': 'should not appear',
'prefix.something': 'left unchanged',
'prefix.schemes': 'adjust list',
'prefix.depreceated': 'do, not, adjust, this, list'
}
result = crypt_context_settings_to_string(settings, 'prefix.')
expected_lines = {
'[passlib]',
'something = left unchanged',
'schemes = adjust,list',
'depreceated = do, not, adjust, this, list',
}
assert set(result.split('\n')) == expected_lines