aboutsummaryrefslogtreecommitdiff
path: root/test_ipaddress.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-02-03 22:53:53 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-02-03 22:53:53 +0100
commit94ca4dd3ea36c4a25c6b19f53d05e224f51a3ed3 (patch)
treee0fbbaf774a936b0e4e22d023ca562b78e0f19cd /test_ipaddress.py
parent39596af490a830453578afd5cd45879ecab46682 (diff)
downloadipaddress-94ca4dd3ea36c4a25c6b19f53d05e224f51a3ed3.tar.gz
Patch int.from_bytes
Diffstat (limited to 'test_ipaddress.py')
-rw-r--r--test_ipaddress.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test_ipaddress.py b/test_ipaddress.py
index f634ac3..886115e 100644
--- a/test_ipaddress.py
+++ b/test_ipaddress.py
@@ -104,7 +104,7 @@ class CommonTestMixin_v4(CommonTestMixin):
def test_bad_packed_length(self):
def assertBadLength(length):
- addr = bytes(length)
+ addr = b'0' * length
msg = "%r (len %d != 4) is not permitted as an IPv4 address"
with self.assertAddressError(re.escape(msg % (addr, length))):
self.factory(addr)
@@ -142,7 +142,7 @@ class CommonTestMixin_v6(CommonTestMixin):
def test_bad_packed_length(self):
def assertBadLength(length):
- addr = bytes(length)
+ addr = b'0' * length
msg = "%r (len %d != 16) is not permitted as an IPv6 address"
with self.assertAddressError(re.escape(msg % (addr, length))):
self.factory(addr)