Ensure a clean ValueError with the expected message
(self, factory, kind)
| 883 | class FactoryFunctionErrors(BaseTestCase): |
| 884 | |
| 885 | def assertFactoryError(self, factory, kind): |
| 886 | """Ensure a clean ValueError with the expected message""" |
| 887 | addr = "camelot" |
| 888 | msg = '%r does not appear to be an IPv4 or IPv6 %s' |
| 889 | with self.assertCleanError(ValueError, msg, addr, kind): |
| 890 | factory(addr) |
| 891 | |
| 892 | def test_ip_address(self): |
| 893 | self.assertFactoryError(ipaddress.ip_address, "address") |
no test coverage detected