summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-06 16:31:03 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-03-06 16:41:57 -0800
commit8735de7479c4c0745a1bd49cfd89f96669a6ce93 (patch)
tree3831bef0d1618ade22b9a5752956719f06f833f1 /tests
parentde3be5da8510605fff09eac6029452656a245972 (diff)
drop bytes support from Address
We don't want to be comparing bytes anyway, the decode would use utf-8, and that isn't right. Instead make the caller convert to a str of Address first.
Diffstat (limited to 'tests')
-rw-r--r--tests/account_test.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/account_test.py b/tests/account_test.py
index 959d4c7c..99df9632 100644
--- a/tests/account_test.py
+++ b/tests/account_test.py
@@ -58,14 +58,6 @@ class TestAddress(unittest.TestCase):
"""Tests for the Address class."""
- def test_constructor_bytes(self):
- with self.assertRaises(AssertionError):
- account.Address(b'username', b'domainname')
-
- def test_from_string_bytes(self):
- with self.assertRaises(AssertionError):
- account.Address.from_string(b'user@example.com')
-
def test_from_string(self):
addr = account.Address.from_string('user@example.com')
self.assertEqual(addr.username, 'user')
@@ -75,10 +67,6 @@ class TestAddress(unittest.TestCase):
addr = account.Address('ušer', 'example.com')
self.assertEqual(str(addr), 'ušer@example.com')
- def test_bytes(self):
- addr = account.Address('ušer', 'example.com')
- self.assertEqual(bytes(addr), 'ušer@example.com'.encode('utf-8'))
-
def test_eq_unicode(self):
addr = account.Address('ušer', 'example.com')
self.assertEqual(addr, 'ušer@example.com')