def test__invalid_interface_raises_interfacenotfound(self): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) with ExpectedException(InterfaceNotFound): get_interface_mac(sock, factory.make_unicode_string(size=15))
def make_log_text(): """Make some random log text.""" return factory.make_unicode_string(size=50, spaces=True)