Browse Source

Use dict.__repr__ for IdnaDict

pull/922/head
Ross McFarland 3 years ago
parent
commit
286e2bc94d
No known key found for this signature in database GPG Key ID: 943B179E15D3B22A
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      octodns/idna.py
  2. +3
    -0
      tests/test_octodns_idna.py

+ 3
- 0
octodns/idna.py View File

@ -69,3 +69,6 @@ class IdnaDict(MutableMapping):
def decoded_items(self):
for key, value in self.items():
yield (idna_decode(key), value)
def __repr__(self):
return self._data.__repr__()

+ 3
- 0
tests/test_octodns_idna.py View File

@ -108,6 +108,9 @@ class TestIdnaDict(TestCase):
self.assertFalse(self.utf8 in d)
self.assertFalse(idna_encode(self.utf8) in d)
# smoke test of repr
d.__repr__()
def test_keys(self):
d = IdnaDict(self.normal)


Loading…
Cancel
Save