More deletions of 'any' state

This commit is contained in:
beeankha
2019-06-13 11:16:05 -04:00
parent c6f1806a23
commit f5b6bd65cf
8 changed files with 9 additions and 14 deletions

View File

@@ -13,7 +13,6 @@ from awx.api.views import (
InventorySourceCredentialsList, InventorySourceCredentialsList,
InventorySourceGroupsList, InventorySourceGroupsList,
InventorySourceHostsList, InventorySourceHostsList,
InventorySourceNotificationTemplatesAnyList,
InventorySourceNotificationTemplatesErrorList, InventorySourceNotificationTemplatesErrorList,
InventorySourceNotificationTemplatesStartedList, InventorySourceNotificationTemplatesStartedList,
InventorySourceNotificationTemplatesSuccessList, InventorySourceNotificationTemplatesSuccessList,

View File

@@ -13,7 +13,6 @@ from awx.api.views import (
JobTemplateSchedulesList, JobTemplateSchedulesList,
JobTemplateSurveySpec, JobTemplateSurveySpec,
JobTemplateActivityStreamList, JobTemplateActivityStreamList,
JobTemplateNotificationTemplatesAnyList,
JobTemplateNotificationTemplatesErrorList, JobTemplateNotificationTemplatesErrorList,
JobTemplateNotificationTemplatesStartedList, JobTemplateNotificationTemplatesStartedList,
JobTemplateNotificationTemplatesSuccessList, JobTemplateNotificationTemplatesSuccessList,

View File

@@ -15,7 +15,6 @@ from awx.api.views import (
OrganizationCredentialList, OrganizationCredentialList,
OrganizationActivityStreamList, OrganizationActivityStreamList,
OrganizationNotificationTemplatesList, OrganizationNotificationTemplatesList,
OrganizationNotificationTemplatesAnyList,
OrganizationNotificationTemplatesErrorList, OrganizationNotificationTemplatesErrorList,
OrganizationNotificationTemplatesStartedList, OrganizationNotificationTemplatesStartedList,
OrganizationNotificationTemplatesSuccessList, OrganizationNotificationTemplatesSuccessList,

View File

@@ -14,7 +14,6 @@ from awx.api.views import (
ProjectUpdatesList, ProjectUpdatesList,
ProjectActivityStreamList, ProjectActivityStreamList,
ProjectSchedulesList, ProjectSchedulesList,
ProjectNotificationTemplatesAnyList,
ProjectNotificationTemplatesErrorList, ProjectNotificationTemplatesErrorList,
ProjectNotificationTemplatesStartedList, ProjectNotificationTemplatesStartedList,
ProjectNotificationTemplatesSuccessList, ProjectNotificationTemplatesSuccessList,

View File

@@ -9,7 +9,6 @@ from awx.api.views import (
SystemJobTemplateLaunch, SystemJobTemplateLaunch,
SystemJobTemplateJobsList, SystemJobTemplateJobsList,
SystemJobTemplateSchedulesList, SystemJobTemplateSchedulesList,
SystemJobTemplateNotificationTemplatesAnyList,
SystemJobTemplateNotificationTemplatesErrorList, SystemJobTemplateNotificationTemplatesErrorList,
SystemJobTemplateNotificationTemplatesStartedList, SystemJobTemplateNotificationTemplatesStartedList,
SystemJobTemplateNotificationTemplatesSuccessList, SystemJobTemplateNotificationTemplatesSuccessList,

View File

@@ -13,7 +13,6 @@ from awx.api.views import (
WorkflowJobTemplateSurveySpec, WorkflowJobTemplateSurveySpec,
WorkflowJobTemplateWorkflowNodesList, WorkflowJobTemplateWorkflowNodesList,
WorkflowJobTemplateActivityStreamList, WorkflowJobTemplateActivityStreamList,
WorkflowJobTemplateNotificationTemplatesAnyList,
WorkflowJobTemplateNotificationTemplatesErrorList, WorkflowJobTemplateNotificationTemplatesErrorList,
WorkflowJobTemplateNotificationTemplatesStartedList, WorkflowJobTemplateNotificationTemplatesStartedList,
WorkflowJobTemplateNotificationTemplatesSuccessList, WorkflowJobTemplateNotificationTemplatesSuccessList,

View File

@@ -42,7 +42,7 @@ def test_inventory_source_notification_on_cloud_only(get, post, inventory_source
not_is = inventory_source_factory("not_ec2") 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}) # url = reverse('api:inventory_source_notification_templates_any_list', kwargs={'pk': cloud_is.id})
# response = post(url, dict(id=notification_template.id), u) # response = post(url, dict(id=notification_template.id), u)
# assert response.status_code == 204 # assert response.status_code == 204

View File

@@ -92,7 +92,7 @@ def test_inherited_notification_templates(get, post, user, organization, project
isrc.save() isrc.save()
jt = JobTemplate.objects.create(name='test', inventory=i, project=project, playbook='debug.yml') jt = JobTemplate.objects.create(name='test', inventory=i, project=project, playbook='debug.yml')
jt.save() 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}) # url = reverse('api:organization_notification_templates_any_list', kwargs={'pk': organization.id})
# response = post(url, dict(id=notification_templates[0]), u) # response = post(url, dict(id=notification_templates[0]), u)
# assert response.status_code == 204 # 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 # assert len(isrc.notification_templates['any']) == 1
@pytest.mark.django_db # Delete the test below? ******
def test_notification_template_merging(get, post, user, organization, project, notification_template): # @pytest.mark.django_db
user('admin-poster', True) # def test_notification_template_merging(get, post, user, organization, project, notification_template):
organization.notification_templates_any.add(notification_template) # user('admin-poster', True)
project.notification_templates_any.add(notification_template) # organization.notification_templates_any.add(notification_template)
assert len(project.notification_templates['any']) == 1 # project.notification_templates_any.add(notification_template)
# assert len(project.notification_templates['any']) == 1
@pytest.mark.django_db @pytest.mark.django_db