def test_update_annotations(self): annotations = Annotations(finalized=True) updating_fancy_dict = FancyDict(key=1) updating_fancy_dict.annotate("key", annotations) base_fancy_dict = FancyDict() base_fancy_dict.update(updating_fancy_dict) assert base_fancy_dict.get_annotations("key").finalized
def test_dont_set_annotations_when_there_are_none(self): fancy_dict = FancyDict(key=1) fancy_dict.annotate("key", None) assert fancy_dict.get_annotations("key") is None