Reverse skipping tests: if no ipaddress

This commit is contained in:
Bo Maryniuk 2018-09-28 16:31:22 +02:00
parent bb37ba0578
commit c14f26f351

View file

@ -267,7 +267,7 @@ class NetworkTestCase(TestCase, LoaderModuleMockMixin):
self.assertDictEqual(network.connect('host', 'port'),
{'comment': ret, 'result': True})
@skipIf(bool(ipaddress), 'unable to import \'ipaddress\'')
@skipIf(not bool(ipaddress), 'unable to import \'ipaddress\'')
def test_is_private(self):
'''
Test for Check if the given IP address is a private address
@ -279,7 +279,7 @@ class NetworkTestCase(TestCase, LoaderModuleMockMixin):
return_value=True):
self.assertTrue(network.is_private('::1'))
@skipIf(bool(ipaddress), 'unable to import \'ipaddress\'')
@skipIf(not bool(ipaddress), 'unable to import \'ipaddress\'')
def test_is_loopback(self):
'''
Test for Check if the given IP address is a loopback address