mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 14:39:30 -02:30
Fix up unit test referencing the custom inventory script
This commit is contained in:
@@ -276,13 +276,13 @@ class InventoryTest(BaseTest):
|
|||||||
|
|
||||||
def test_create_inventory_script(self):
|
def test_create_inventory_script(self):
|
||||||
inventory_scripts = reverse('api:inventory_script_list')
|
inventory_scripts = reverse('api:inventory_script_list')
|
||||||
new_script = dict(name="Test", description="Test Script", script=TEST_SIMPLE_INVENTORY_SCRIPT)
|
new_script = dict(name="Test", description="Test Script", script=TEST_SIMPLE_INVENTORY_SCRIPT, organization=self.organizations[0].id)
|
||||||
script_data = self.post(inventory_scripts, data=new_script, expect=201, auth=self.get_super_credentials())
|
script_data = self.post(inventory_scripts, data=new_script, expect=201, auth=self.get_super_credentials())
|
||||||
|
|
||||||
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)
|
new_failed_script = dict(name="Shouldfail", description="This test should 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=403, auth=self.get_normal_credentials())
|
||||||
|
|
||||||
def test_main_line(self):
|
def test_main_line(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user