s/assertItemsEqual/assertCountEqual/g
assertItemsEqual was renamed to assertCountEqual in Python 3, and the testsuite is failing now - rename it. See also https://six.readthedocs.io/#six.assertCountEqual This unbreaks the testsuite. Change-Id: I4c9d3d1f6a5566f46b00f69d8f45487472405ffe
This commit is contained in:
parent
101bff9c6e
commit
0e1c0e0a6c
@ -40,7 +40,7 @@ class AuditTemplatesTest(test.BaseAdminViewTests):
|
||||
res = self.client.get(INDEX_URL)
|
||||
self.assertTemplateUsed(res, 'infra_optim/audit_templates/index.html')
|
||||
audit_templates = res.context['audit_templates_table'].data
|
||||
self.assertItemsEqual(audit_templates, self.audit_templates.list())
|
||||
self.assertCountEqual(audit_templates, self.audit_templates.list())
|
||||
|
||||
@mock.patch.object(api.watcher.AuditTemplate, 'list')
|
||||
def test_audit_template_list_unavailable(self, mock_list):
|
||||
@ -88,7 +88,7 @@ class AuditTemplatesTest(test.BaseAdminViewTests):
|
||||
self.assertTemplateUsed(res,
|
||||
'infra_optim/audit_templates/details.html')
|
||||
audit_templates = res.context['audit_template']
|
||||
self.assertItemsEqual([audit_templates], [at])
|
||||
self.assertCountEqual([audit_templates], [at])
|
||||
|
||||
@mock.patch.object(api.watcher.AuditTemplate, 'get')
|
||||
def test_details_exception(self, m_get):
|
||||
|
@ -32,7 +32,7 @@ class GoalsTest(test.BaseAdminViewTests):
|
||||
res = self.client.get(INDEX_URL)
|
||||
self.assertTemplateUsed(res, 'infra_optim/goals/index.html')
|
||||
goals = res.context['goals_table'].data
|
||||
self.assertItemsEqual(goals, self.goals.list())
|
||||
self.assertCountEqual(goals, self.goals.list())
|
||||
|
||||
@mock.patch.object(api.watcher.Goal, 'list')
|
||||
def test_goal_list_unavailable(self, mock_list):
|
||||
@ -52,7 +52,7 @@ class GoalsTest(test.BaseAdminViewTests):
|
||||
res = self.client.get(DETAILS_URL)
|
||||
self.assertTemplateUsed(res, 'infra_optim/goals/details.html')
|
||||
goals = res.context['goal']
|
||||
self.assertItemsEqual([goals], [goal])
|
||||
self.assertCountEqual([goals], [goal])
|
||||
|
||||
@mock.patch.object(api.watcher.Goal, 'get')
|
||||
def test_details_exception(self, mock_get):
|
||||
|
@ -41,7 +41,7 @@ class StrategiesTest(test.BaseAdminViewTests):
|
||||
res = self.client.get(INDEX_URL)
|
||||
self.assertTemplateUsed(res, 'infra_optim/strategies/index.html')
|
||||
strategies = res.context['strategies_table'].data
|
||||
self.assertItemsEqual(strategies, self.strategies.list())
|
||||
self.assertCountEqual(strategies, self.strategies.list())
|
||||
|
||||
@mock.patch.object(api.watcher.Strategy, 'list')
|
||||
def test_strategy_list_unavailable(self, mock_list):
|
||||
@ -61,7 +61,7 @@ class StrategiesTest(test.BaseAdminViewTests):
|
||||
self.assertTemplateUsed(res,
|
||||
'infra_optim/strategies/details.html')
|
||||
strategies = res.context['strategy']
|
||||
self.assertItemsEqual([strategies], [at])
|
||||
self.assertCountEqual([strategies], [at])
|
||||
|
||||
@mock.patch.object(api.watcher.Strategy, 'get')
|
||||
def test_details_exception(self, mock_get):
|
||||
|
Loading…
Reference in New Issue
Block a user