Created
February 13, 2023 17:46
-
-
Save zalun/5153670da3141710db0964087660b80d to your computer and use it in GitHub Desktop.
Coder's Adventures: Triggering an old bug with a new code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# test_b_get_field.py | |
from .get_field import get_field | |
from .resource import IMPORTANT_DICT | |
def test_get_field_minimal(): | |
assert get_field() is None | |
def test_get_field_another_key(): | |
assert get_field(key="another key") is None | |
def test_get_field_existing_dict(): | |
assert get_field(dictionary=IMPORTANT_DICT) == {"key": "value"} | |
def test_get_field_existing_dict_another_key(): | |
assert get_field(dictionary=IMPORTANT_DICT, key="another key") is None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment