()
| 125 | |
| 126 | |
| 127 | def test_django_forms_resolver(): |
| 128 | from _pydevd_bundle.pydevd_resolver import DjangoFormResolver |
| 129 | |
| 130 | django_form_resolver = DjangoFormResolver() |
| 131 | |
| 132 | class MyObject(object): |
| 133 | def __init__(self): |
| 134 | self.__dict__[(1, 2)] = (3, 4) |
| 135 | self.__dict__["errors"] = "foo" |
| 136 | |
| 137 | obj = MyObject() |
| 138 | |
| 139 | dictionary = clear_contents_dictionary(django_form_resolver.get_dictionary(obj)) |
| 140 | assert dictionary == {"(1, 2)": (3, 4), "errors": None} |
| 141 | |
| 142 | obj._errors = "bar" |
| 143 | dictionary = clear_contents_dictionary(django_form_resolver.get_dictionary(obj)) |
| 144 | assert dictionary == {"(1, 2)": (3, 4), "errors": "bar", "_errors": "bar"} |
| 145 | |
| 146 | |
| 147 | def clear_contents_debug_adapter_protocol(contents_debug_adapter_protocol): |
nothing calls this directly
no test coverage detected