mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Updated old test case to allow org admins to create inventory scripts
This was added in e9fe45389d
This commit is contained in:
parent
ee8215dc52
commit
7aa31bb51b
@ -285,10 +285,10 @@ class InventoryTest(BaseTest):
|
|||||||
got = self.get(inventory_scripts, expect=200, auth=self.get_super_credentials())
|
got = self.get(inventory_scripts, expect=200, auth=self.get_super_credentials())
|
||||||
self.assertEquals(got['count'], 1)
|
self.assertEquals(got['count'], 1)
|
||||||
|
|
||||||
new_failed_script = dict(name="Shouldfail", description="This test should fail", script=TEST_SIMPLE_INVENTORY_SCRIPT, organization=self.organizations[0].id)
|
new_failed_script = dict(name="Should not fail", description="This test should not fail", script=TEST_SIMPLE_INVENTORY_SCRIPT, organization=self.organizations[0].id)
|
||||||
self.post(inventory_scripts, data=new_failed_script, expect=403, auth=self.get_normal_credentials())
|
self.post(inventory_scripts, data=new_failed_script, expect=201, auth=self.get_normal_credentials())
|
||||||
|
|
||||||
failed_no_shebang = dict(name="ShouldAlsoFail", descript="This test should also fail", script=TEST_SIMPLE_INVENTORY_SCRIPT_WITHOUT_HASHBANG,
|
failed_no_shebang = dict(name="ShouldFail", descript="This test should fail", script=TEST_SIMPLE_INVENTORY_SCRIPT_WITHOUT_HASHBANG,
|
||||||
organization=self.organizations[0].id)
|
organization=self.organizations[0].id)
|
||||||
self.post(inventory_scripts, data=failed_no_shebang, expect=400, auth=self.get_super_credentials())
|
self.post(inventory_scripts, data=failed_no_shebang, expect=400, auth=self.get_super_credentials())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user