Update safe_value_fallback to allow empty 2nd keys

This commit is contained in:
Matthias
2023-09-11 20:03:08 +02:00
parent 4798dea6e1
commit 96e5615d1b
2 changed files with 4 additions and 2 deletions

View File

@@ -121,6 +121,8 @@ def test_safe_value_fallback():
assert safe_value_fallback(dict1, 'keyNo', 'keyNo') is None
assert safe_value_fallback(dict1, 'keyNo', 'keyNo', 55) == 55
assert safe_value_fallback(dict1, 'keyNo', default_value=55) == 55
assert safe_value_fallback(dict1, 'keyNo', None, default_value=55) == 55
def test_safe_value_fallback2():