Using RFC5737 example ip addrs

This commit is contained in:
Josh Gachnang 2014-03-19 14:01:49 -07:00
parent d0323f3ec1
commit 85234b702c
2 changed files with 8 additions and 8 deletions

View File

@ -120,8 +120,8 @@ class TestBaseAgent(unittest.TestCase):
def setUp(self):
self.encoder = encoding.RESTJSONEncoder(indent=4)
self.agent = agent.TeethAgent('https://fake_api.example.org:8081/',
('31.41.59.26', 9990),
('42.42.42.42', 9999))
('203.0.113.1', 9990),
('192.0.2.1', 9999))
def assertEqualEncoded(self, a, b):
# Evidently JSONEncoder.default() can't handle None (??) so we have to
@ -165,7 +165,7 @@ class TestBaseAgent(unittest.TestCase):
self.agent.api_client.lookup_node = mock.Mock()
self.agent.run()
listen_addr = ('42.42.42.42', 9999)
listen_addr = ('192.0.2.1', 9999)
wsgi_server_cls.assert_called_once_with(
listen_addr[0],
listen_addr[1],

View File

@ -48,7 +48,7 @@ class TestBaseTeethAgent(unittest.TestCase):
heartbeat_before = self.api_client.heartbeat(
uuid='deadbeef-dabb-ad00-b105-f00d00bab10c',
advertise_address=('42.42.42.42', '9999')
advertise_address=('192.0.2.1', '9999')
)
self.assertEqual(heartbeat_before, expected_heartbeat_before)
@ -66,7 +66,7 @@ class TestBaseTeethAgent(unittest.TestCase):
self.assertRaises(errors.HeartbeatError,
self.api_client.heartbeat,
uuid='deadbeef-dabb-ad00-b105-f00d00bab10c',
advertise_address=('42.42.42.42', '9999'))
advertise_address=('192.0.2.1', '9999'))
def test_heartbeat_invalid_status_code(self):
response = httmock.response(status_code=404)
@ -76,7 +76,7 @@ class TestBaseTeethAgent(unittest.TestCase):
self.assertRaises(errors.HeartbeatError,
self.api_client.heartbeat,
uuid='deadbeef-dabb-ad00-b105-f00d00bab10c',
advertise_address=('42.42.42.42', '9999'))
advertise_address=('192.0.2.1', '9999'))
def test_heartbeat_missing_heartbeat_before_header(self):
response = httmock.response(status_code=204)
@ -86,7 +86,7 @@ class TestBaseTeethAgent(unittest.TestCase):
self.assertRaises(errors.HeartbeatError,
self.api_client.heartbeat,
uuid='deadbeef-dabb-ad00-b105-f00d00bab10c',
advertise_address=('42.42.42.42', '9999'))
advertise_address=('192.0.2.1', '9999'))
def test_heartbeat_invalid_heartbeat_before_header(self):
response = httmock.response(status_code=204, headers={
@ -98,7 +98,7 @@ class TestBaseTeethAgent(unittest.TestCase):
self.assertRaises(errors.HeartbeatError,
self.api_client.heartbeat,
uuid='deadbeef-dabb-ad00-b105-f00d00bab10c',
advertise_address=('42.42.42.42', '9999'))
advertise_address=('192.0.2.1', '9999'))
def test_lookup_node(self):
response = httmock.response(status_code=200, content={