Merge "Correct 'list index out of range' error in dhcp agent test"

This commit is contained in:
Jenkins 2016-10-14 07:34:41 +00:00 committed by Gerrit Code Review
commit 668eed2fca
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ class DHCPAgentSchedulersTestJSON(base.BaseAdminNetworkTest):
body = self.admin_networks_client.list_dhcp_agents_on_hosting_network(
self.network['id'])
agents = body['agents']
self.assertIsNotNone(agents)
self.assertNotEmpty(agents, "no dhcp agent")
agent = agents[0]
self.assertTrue(self._check_network_in_dhcp_agent(
self.network['id'], agent))