def test_init_with_client(self): u = agent.UnixDomainHttpProtocol(mock.Mock(), 'foo', mock.Mock()) self.assertEqual(u.client_address, 'foo')
def test_init_empty_client(self): u = agent.UnixDomainHttpProtocol(mock.Mock(), '', mock.Mock()) self.assertEqual(u.client_address, ('<local>', 0))