mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
style tweaks, add one more assertion
This commit is contained in:
@@ -641,8 +641,8 @@ class OrganizationList(ListCreateAPIView):
|
||||
# the case of deleted (and purged) inventory
|
||||
db_JT_results = self.request.user.get_queryset(JobTemplate)\
|
||||
.filter(inventory_id__in=inv_qs.values_list('pk', flat=True))\
|
||||
.values(JT_reference).annotate(Count(JT_reference)).\
|
||||
order_by(JT_reference)
|
||||
.values(JT_reference).annotate(Count(JT_reference))\
|
||||
.order_by(JT_reference)
|
||||
|
||||
# Produce counts of m2m relationships
|
||||
project_qs = self.request.user.get_queryset(Project)
|
||||
|
||||
@@ -63,6 +63,7 @@ def test_new_org_zero_counts(user, post):
|
||||
new_org_list = post_response.render().data
|
||||
counts_dict = new_org_list['summary_fields']['counts']
|
||||
|
||||
assert post_response.status_code == 201
|
||||
assert counts_dict == {
|
||||
'users': 0,
|
||||
'admins': 0,
|
||||
@@ -80,8 +81,6 @@ def test_two_organizations(resourced_organization, organizations, user, get):
|
||||
response = get(reverse('api:organization_list', args=[]), external_admin)
|
||||
org_id_full = resourced_organization.id
|
||||
org_id_zero = organization_zero.id
|
||||
print ' ids: ' + str(org_id_full) + " : " + str(org_id_zero)
|
||||
print ' counts_dict: ' + str(response.data['results'])
|
||||
counts = {}
|
||||
for i in range(2):
|
||||
org_id = response.data['results'][i]['id']
|
||||
|
||||
Reference in New Issue
Block a user