(self)
| 974 | assert not p2.contains(reg, class="st">"fake") |
| 975 | |
| 976 | def test_registry_setdefault(self): |
| 977 | reg = {} |
| 978 | umapper = inspect(self.classes.User) |
| 979 | amapper = inspect(self.classes.Address) |
| 980 | |
| 981 | p1 = PathRegistry.coerce((umapper, umapper.attrs.addresses)) |
| 982 | p2 = PathRegistry.coerce((umapper, umapper.attrs.addresses, amapper)) |
| 983 | reg.update({(class="st">"p1key", p1.path): class="st">"p1value"}) |
| 984 | |
| 985 | p1.setdefault(reg, class="st">"p1key", class="st">"p1newvalue_a") |
| 986 | p1.setdefault(reg, class="st">"p1key_new", class="st">"p1newvalue_b") |
| 987 | p2.setdefault(reg, class="st">"p2key", class="st">"p2newvalue") |
| 988 | eq_( |
| 989 | reg, |
| 990 | { |
| 991 | (class="st">"p1key", p1.path): class="st">"p1value", |
| 992 | (class="st">"p1key_new", p1.path): class="st">"p1newvalue_b", |
| 993 | (class="st">"p2key", p2.path): class="st">"p2newvalue", |
| 994 | }, |
| 995 | ) |
| 996 | |
| 997 | def test_serialize(self): |
| 998 | User = self.classes.User |
nothing calls this directly
no test coverage detected