mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
Merge branch 'master' of https://github.com/ansible/ansible-commander
This commit is contained in:
@@ -257,6 +257,11 @@ class ProjectsTest(BaseTest):
|
|||||||
# you can't add organizations to projects here, verify that this is true (405)
|
# you can't add organizations to projects here, verify that this is true (405)
|
||||||
#self.post(proj_orgs, data={}, expect=405, auth=self.get_super_credentials())
|
#self.post(proj_orgs, data={}, expect=405, auth=self.get_super_credentials())
|
||||||
|
|
||||||
|
# yes you can post now.
|
||||||
|
self.post(proj_orgs, data={'name': 'New Org'}, expect=201, auth=self.get_super_credentials())
|
||||||
|
got = self.get(proj_orgs, expect=200, auth=self.get_super_credentials())
|
||||||
|
self.assertEquals(got['count'], 2)
|
||||||
|
|
||||||
# =====================================================================
|
# =====================================================================
|
||||||
# TEAMS
|
# TEAMS
|
||||||
|
|
||||||
|
|||||||
@@ -449,6 +449,7 @@ class ProjectOrganizationsList(BaseSubList):
|
|||||||
parent_model = Project
|
parent_model = Project
|
||||||
relationship = 'organizations'
|
relationship = 'organizations'
|
||||||
postable = True
|
postable = True
|
||||||
|
inject_primary_key_on_post_as = 'project' # Not correct, but needed for the post to work?
|
||||||
filter_fields = ('name',)
|
filter_fields = ('name',)
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
@@ -465,6 +466,7 @@ class ProjectTeamsList(BaseSubList):
|
|||||||
parent_model = Project
|
parent_model = Project
|
||||||
relationship = 'teams'
|
relationship = 'teams'
|
||||||
postable = True
|
postable = True
|
||||||
|
inject_primary_key_on_post_as = 'project' # Not correct, but needed for the post to work?
|
||||||
filter_fields = ('name',)
|
filter_fields = ('name',)
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user