Fixed tests for issue #23133 (pickling of IPv4Network was not tested).

This commit is contained in:
Serhiy Storchaka 2015-01-18 22:56:47 +02:00
parent 5f38f5c502
commit a556af77a7
1 changed files with 4 additions and 4 deletions

View File

@ -456,16 +456,16 @@ class NetmaskTestMixin_v4(CommonTestMixin_v4):
assertBadNetmask("1.1.1.1", "pudding")
assertBadNetmask("1.1.1.1", "::")
class InterfaceTestCase_v4(BaseTestCase, NetmaskTestMixin_v4):
factory = ipaddress.IPv4Interface
def test_pickle(self):
self.pickle_test('192.0.2.0/27')
self.pickle_test('192.0.2.0/31') # IPV4LENGTH - 1
self.pickle_test('192.0.2.0') # IPV4LENGTH
class InterfaceTestCase_v4(BaseTestCase, NetmaskTestMixin_v4):
factory = ipaddress.IPv4Interface
class NetworkTestCase_v4(BaseTestCase, NetmaskTestMixin_v4):
factory = ipaddress.IPv4Network