Browse Source

Use InAnyOrder for role creation mocks

The user/roles can be created in any order due to
python random seed ordering dictionaries, so the
mocks should be in random order

Change-Id: I23a9380fb65ac634831beb496af388381d0230d4
Partial-Bug: #1348818
changes/29/272729/5
Itxaka 7 years ago committed by Itxaka Serrano Garcia
parent
commit
ff30c682fb
  1. 6
      openstack_dashboard/dashboards/identity/projects/tests.py

6
openstack_dashboard/dashboards/identity/projects/tests.py

@ -799,18 +799,18 @@ class UpdateProjectWorkflowTests(test.BaseAdminViewTests):
api.keystone.add_tenant_user_role(IsA(http.HttpRequest),
project=self.tenant.id,
user='1',
role='2',)
role='2',).InAnyOrder()
# remove role 2 from user 2
api.keystone.remove_tenant_user_role(IsA(http.HttpRequest),
project=self.tenant.id,
user='2',
role='2')
role='2').InAnyOrder()
# Give user 3 role 1
api.keystone.add_tenant_user_role(IsA(http.HttpRequest),
project=self.tenant.id,
user='3',
role='1',)
role='1',).InAnyOrder()
api.keystone.group_list(IsA(http.HttpRequest),
domain=self.domain.id,
project=self.tenant.id) \

Loading…
Cancel
Save