Explicitly convert `assertQuerysetEqual
` input parameters
Since [1], Django do not implicitly call ``repr()`` on the input
queries. It is needed to explicitly convert the input values
before comparing. This patch is present in Django 4.1.
This patch also bumps horizon to version 23.4.0. This version
contains [2], that bumped the required version of Django to 4.2.
[1]e2be307b3a
[2]https://review.opendev.org/c/openstack/horizon/+/905218
Closes-Bug: #2057914
Change-Id: I48ec7a57b9a9774ce0cd5853a6486c4acb7d9fb3
This commit is contained in:
parent
bc85f39690
commit
6eac211b03
@ -255,7 +255,8 @@ class VPNTests(test.TestCase):
|
||||
self.assertEqual(workflow.name, workflows.AddVPNService.name)
|
||||
|
||||
expected_objs = ['<AddVPNServiceStep: addvpnserviceaction>', ]
|
||||
self.assertQuerysetEqual(workflow.steps, expected_objs)
|
||||
steps = [repr(step) for step in workflow.steps]
|
||||
self.assertQuerysetEqual(steps, expected_objs)
|
||||
|
||||
self.mock_network_list_for_tenant.assert_called_once_with(
|
||||
helpers.IsHttpRequest(), self.tenant.id)
|
||||
@ -331,7 +332,8 @@ class VPNTests(test.TestCase):
|
||||
self.assertEqual(workflow.name, workflows.AddEndpointGroup.name)
|
||||
|
||||
expected_objs = ['<AddEndpointGroupStep: addendpointgroupaction>', ]
|
||||
self.assertQuerysetEqual(workflow.steps, expected_objs)
|
||||
steps = [repr(step) for step in workflow.steps]
|
||||
self.assertQuerysetEqual(steps, expected_objs)
|
||||
self.mock_network_list_for_tenant.assert_called_once_with(
|
||||
helpers.IsHttpRequest(), self.tenant.id)
|
||||
|
||||
@ -389,7 +391,8 @@ class VPNTests(test.TestCase):
|
||||
self.assertEqual(workflow.name, workflows.AddIKEPolicy.name)
|
||||
|
||||
expected_objs = ['<AddIKEPolicyStep: addikepolicyaction>', ]
|
||||
self.assertQuerysetEqual(workflow.steps, expected_objs)
|
||||
steps = [repr(step) for step in workflow.steps]
|
||||
self.assertQuerysetEqual(steps, expected_objs)
|
||||
|
||||
@helpers.create_mocks({api_vpn: ('ikepolicy_create', )})
|
||||
def test_add_ikepolicy_post(self):
|
||||
@ -448,7 +451,8 @@ class VPNTests(test.TestCase):
|
||||
self.assertEqual(workflow.name, workflows.AddIPsecPolicy.name)
|
||||
|
||||
expected_objs = ['<AddIPsecPolicyStep: addipsecpolicyaction>', ]
|
||||
self.assertQuerysetEqual(workflow.steps, expected_objs)
|
||||
steps = [repr(step) for step in workflow.steps]
|
||||
self.assertQuerysetEqual(steps, expected_objs)
|
||||
|
||||
@helpers.create_mocks({api_vpn: ('ipsecpolicy_create', )})
|
||||
def test_add_ipsecpolicy_post(self):
|
||||
@ -525,7 +529,8 @@ class VPNTests(test.TestCase):
|
||||
'addipsecsiteconnectionaction>',
|
||||
'<AddIPsecSiteConnectionOptionalStep: '
|
||||
'addipsecsiteconnectionoptionalaction>', ]
|
||||
self.assertQuerysetEqual(workflow.steps, expected_objs)
|
||||
steps = [repr(step) for step in workflow.steps]
|
||||
self.assertQuerysetEqual(steps, expected_objs)
|
||||
|
||||
self.mock_ikepolicy_list.assert_called_once_with(
|
||||
helpers.IsHttpRequest(),
|
||||
|
@ -7,5 +7,5 @@
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
horizon>=18.3.1 # Apache-2.0
|
||||
horizon>=23.4.0 # Apache-2.0
|
||||
python-neutronclient>=6.7.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user