Remove insights_credential from inventory

This commit is contained in:
Bill Nottingham
2021-06-16 16:47:42 -04:00
committed by Shane McDonald
parent 0947d30682
commit 1e68519c99
26 changed files with 38 additions and 267 deletions

View File

@@ -592,23 +592,3 @@ class TestControlledBySCM:
rando,
expect=403,
)
@pytest.mark.django_db
class TestInsightsCredential:
def test_insights_credential(self, patch, insights_inventory, admin_user, insights_credential):
patch(insights_inventory.get_absolute_url(), {'insights_credential': insights_credential.id}, admin_user, expect=200)
def test_insights_credential_protection(self, post, patch, insights_inventory, alice, insights_credential):
insights_inventory.organization.admin_role.members.add(alice)
insights_inventory.admin_role.members.add(alice)
post(
reverse('api:inventory_list'),
{"name": "test", "organization": insights_inventory.organization.id, "insights_credential": insights_credential.id},
alice,
expect=403,
)
patch(insights_inventory.get_absolute_url(), {'insights_credential': insights_credential.id}, alice, expect=403)
def test_non_insights_credential(self, patch, insights_inventory, admin_user, scm_credential):
patch(insights_inventory.get_absolute_url(), {'insights_credential': scm_credential.id}, admin_user, expect=400)