mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
More deletions of 'any' state
This commit is contained in:
parent
c6f1806a23
commit
f5b6bd65cf
@ -13,7 +13,6 @@ from awx.api.views import (
|
||||
InventorySourceCredentialsList,
|
||||
InventorySourceGroupsList,
|
||||
InventorySourceHostsList,
|
||||
InventorySourceNotificationTemplatesAnyList,
|
||||
InventorySourceNotificationTemplatesErrorList,
|
||||
InventorySourceNotificationTemplatesStartedList,
|
||||
InventorySourceNotificationTemplatesSuccessList,
|
||||
|
||||
@ -13,7 +13,6 @@ from awx.api.views import (
|
||||
JobTemplateSchedulesList,
|
||||
JobTemplateSurveySpec,
|
||||
JobTemplateActivityStreamList,
|
||||
JobTemplateNotificationTemplatesAnyList,
|
||||
JobTemplateNotificationTemplatesErrorList,
|
||||
JobTemplateNotificationTemplatesStartedList,
|
||||
JobTemplateNotificationTemplatesSuccessList,
|
||||
|
||||
@ -15,7 +15,6 @@ from awx.api.views import (
|
||||
OrganizationCredentialList,
|
||||
OrganizationActivityStreamList,
|
||||
OrganizationNotificationTemplatesList,
|
||||
OrganizationNotificationTemplatesAnyList,
|
||||
OrganizationNotificationTemplatesErrorList,
|
||||
OrganizationNotificationTemplatesStartedList,
|
||||
OrganizationNotificationTemplatesSuccessList,
|
||||
|
||||
@ -14,7 +14,6 @@ from awx.api.views import (
|
||||
ProjectUpdatesList,
|
||||
ProjectActivityStreamList,
|
||||
ProjectSchedulesList,
|
||||
ProjectNotificationTemplatesAnyList,
|
||||
ProjectNotificationTemplatesErrorList,
|
||||
ProjectNotificationTemplatesStartedList,
|
||||
ProjectNotificationTemplatesSuccessList,
|
||||
|
||||
@ -9,7 +9,6 @@ from awx.api.views import (
|
||||
SystemJobTemplateLaunch,
|
||||
SystemJobTemplateJobsList,
|
||||
SystemJobTemplateSchedulesList,
|
||||
SystemJobTemplateNotificationTemplatesAnyList,
|
||||
SystemJobTemplateNotificationTemplatesErrorList,
|
||||
SystemJobTemplateNotificationTemplatesStartedList,
|
||||
SystemJobTemplateNotificationTemplatesSuccessList,
|
||||
|
||||
@ -13,7 +13,6 @@ from awx.api.views import (
|
||||
WorkflowJobTemplateSurveySpec,
|
||||
WorkflowJobTemplateWorkflowNodesList,
|
||||
WorkflowJobTemplateActivityStreamList,
|
||||
WorkflowJobTemplateNotificationTemplatesAnyList,
|
||||
WorkflowJobTemplateNotificationTemplatesErrorList,
|
||||
WorkflowJobTemplateNotificationTemplatesStartedList,
|
||||
WorkflowJobTemplateNotificationTemplatesSuccessList,
|
||||
|
||||
@ -42,7 +42,7 @@ def test_inventory_source_notification_on_cloud_only(get, post, inventory_source
|
||||
|
||||
not_is = inventory_source_factory("not_ec2")
|
||||
|
||||
# Delete the below portion?
|
||||
# Delete the below portion? ******
|
||||
# url = reverse('api:inventory_source_notification_templates_any_list', kwargs={'pk': cloud_is.id})
|
||||
# response = post(url, dict(id=notification_template.id), u)
|
||||
# assert response.status_code == 204
|
||||
|
||||
@ -92,7 +92,7 @@ def test_inherited_notification_templates(get, post, user, organization, project
|
||||
isrc.save()
|
||||
jt = JobTemplate.objects.create(name='test', inventory=i, project=project, playbook='debug.yml')
|
||||
jt.save()
|
||||
# What can we replace the below tests with?
|
||||
# What can we replace the below tests with? ******
|
||||
# url = reverse('api:organization_notification_templates_any_list', kwargs={'pk': organization.id})
|
||||
# response = post(url, dict(id=notification_templates[0]), u)
|
||||
# assert response.status_code == 204
|
||||
@ -107,12 +107,13 @@ def test_inherited_notification_templates(get, post, user, organization, project
|
||||
# assert len(isrc.notification_templates['any']) == 1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_notification_template_merging(get, post, user, organization, project, notification_template):
|
||||
user('admin-poster', True)
|
||||
organization.notification_templates_any.add(notification_template)
|
||||
project.notification_templates_any.add(notification_template)
|
||||
assert len(project.notification_templates['any']) == 1
|
||||
# Delete the test below? ******
|
||||
# @pytest.mark.django_db
|
||||
# def test_notification_template_merging(get, post, user, organization, project, notification_template):
|
||||
# user('admin-poster', True)
|
||||
# organization.notification_templates_any.add(notification_template)
|
||||
# project.notification_templates_any.add(notification_template)
|
||||
# assert len(project.notification_templates['any']) == 1
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user