mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 02:00:01 -03:30
Ability to add tags to an organization.
This commit is contained in:
@@ -356,10 +356,24 @@ class OrganizationsTest(BaseTest):
|
||||
self.assertEqual(users['count'], 2)
|
||||
|
||||
def test_post_item_subobjects_admins(self):
|
||||
pass
|
||||
|
||||
url = '/api/v1/organizations/2/admins/'
|
||||
admins = self.get(url, expect=200, auth=self.get_normal_credentials())
|
||||
self.assertEqual(admins['count'], 1)
|
||||
self.post(url, dict(id=1), expect=204, auth=self.get_normal_credentials())
|
||||
admins = self.get(url, expect=200, auth=self.get_normal_credentials())
|
||||
self.assertEqual(admins['count'], 2)
|
||||
|
||||
def test_post_item_subobjects_tags(self):
|
||||
pass
|
||||
|
||||
tag = Tag.objects.create(name='blippy')
|
||||
url = '/api/v1/organizations/2/tags/'
|
||||
tags = self.get(url, expect=200, auth=self.get_normal_credentials())
|
||||
self.assertEqual(tags['count'], 0)
|
||||
self.post(url, dict(id=tag.pk), expect=204, auth=self.get_normal_credentials())
|
||||
tags = self.get(url, expect=200, auth=self.get_normal_credentials())
|
||||
self.assertEqual(tags['count'], 1)
|
||||
self.assertEqual(tags['results'][0]['id'], tag.pk)
|
||||
|
||||
def test_post_item_subobjects_audit_trail(self):
|
||||
pass
|
||||
@@ -381,8 +395,6 @@ class OrganizationsTest(BaseTest):
|
||||
self.put(urls[0], new_data1, expect=403, auth=self.get_normal_credentials())
|
||||
put_result = self.put(urls[1], new_data1, expect=200, auth=self.get_normal_credentials())
|
||||
|
||||
# FIXME: test the contents of the put returned object
|
||||
|
||||
# get back org 1 and see if it changed
|
||||
get_result = self.get(urls[1], expect=200, auth=self.get_normal_credentials())
|
||||
self.assertEquals(get_result['description'], 'updated description')
|
||||
@@ -406,12 +418,6 @@ class OrganizationsTest(BaseTest):
|
||||
first_sub_project = sub_projects['results'][0]
|
||||
self.put(projects0_url, first_sub_project, expect=405, auth=self.get_super_credentials())
|
||||
|
||||
def test_put_item_subobjects_users(self):
|
||||
pass
|
||||
|
||||
def test_put_item_subobjects_admins(self):
|
||||
pass
|
||||
|
||||
def test_delete_item(self):
|
||||
|
||||
# first get some urls
|
||||
|
||||
Reference in New Issue
Block a user