mirror of
https://github.com/VinylDNS/vinyldns
synced 2025-08-31 14:25:30 +00:00
expand batch change statuses (#768)
This commit is contained in:
@@ -21,8 +21,8 @@ def test_approve_pending_batch_change_success(shared_zone_test_context):
|
||||
try:
|
||||
result = client.create_batch_change(batch_change_input, status=202)
|
||||
get_batch = client.get_batch_change(result['id'])
|
||||
assert_that(get_batch['status'], is_('Pending'))
|
||||
assert_that(get_batch['approvalStatus'], is_('PendingApproval'))
|
||||
assert_that(get_batch['status'], is_('PendingReview'))
|
||||
assert_that(get_batch['approvalStatus'], is_('PendingReview'))
|
||||
assert_that(get_batch['changes'][0]['status'], is_('NeedsReview'))
|
||||
assert_that(get_batch['changes'][0]['validationErrors'][0]['errorType'], is_('ZoneDiscoveryError'))
|
||||
|
||||
|
@@ -157,9 +157,9 @@ def test_list_batch_change_summaries_with_pending_status(list_fixture):
|
||||
Test listing a limited number of user's batch change summaries with maxItems parameter
|
||||
"""
|
||||
client = list_fixture.client
|
||||
batch_change_summaries_result = client.list_batch_change_summaries(status=200, approval_status="PendingApproval")
|
||||
batch_change_summaries_result = client.list_batch_change_summaries(status=200, approval_status="PendingReview")
|
||||
|
||||
list_fixture.check_batch_change_summaries_page_accuracy(batch_change_summaries_result, size=0, approval_status="PendingApproval")
|
||||
list_fixture.check_batch_change_summaries_page_accuracy(batch_change_summaries_result, size=0, approval_status="PendingReview")
|
||||
|
||||
def test_list_batch_change_summaries_with_list_batch_change_summaries_with_no_changes_passes():
|
||||
"""
|
||||
|
@@ -16,15 +16,15 @@ def test_reject_pending_batch_change_success(shared_zone_test_context):
|
||||
}
|
||||
result = client.create_batch_change(batch_change_input, status=202)
|
||||
get_batch = client.get_batch_change(result['id'])
|
||||
assert_that(get_batch['status'], is_('Pending'))
|
||||
assert_that(get_batch['approvalStatus'], is_('PendingApproval'))
|
||||
assert_that(get_batch['status'], is_('PendingReview'))
|
||||
assert_that(get_batch['approvalStatus'], is_('PendingReview'))
|
||||
assert_that(get_batch['changes'][0]['status'], is_('NeedsReview'))
|
||||
assert_that(get_batch['changes'][0]['validationErrors'][0]['errorType'], is_('ZoneDiscoveryError'))
|
||||
|
||||
rejector.reject_batch_change(result['id'], status=200)
|
||||
get_batch = client.get_batch_change(result['id'])
|
||||
|
||||
assert_that(get_batch['status'], is_('Failed'))
|
||||
assert_that(get_batch['status'], is_('Rejected'))
|
||||
assert_that(get_batch['approvalStatus'], is_('ManuallyRejected'))
|
||||
assert_that(get_batch['reviewerId'], is_('support-user-id'))
|
||||
assert_that(get_batch['reviewerUserName'], is_('support-user'))
|
||||
@@ -80,7 +80,7 @@ def test_reject_batch_change_fails_with_forbidden_error_for_non_system_admins(sh
|
||||
@pytest.mark.manual_batch_review
|
||||
def test_reject_batch_change_fails_when_not_pending_approval(shared_zone_test_context):
|
||||
"""
|
||||
Test rejecting a batch change fails if the batch is not PendingApproval
|
||||
Test rejecting a batch change fails if the batch is not PendingReview
|
||||
"""
|
||||
client = shared_zone_test_context.ok_vinyldns_client
|
||||
rejector = shared_zone_test_context.support_user_client
|
||||
@@ -97,7 +97,7 @@ def test_reject_batch_change_fails_when_not_pending_approval(shared_zone_test_co
|
||||
to_delete = [(change['zoneId'], change['recordSetId']) for change in completed_batch['changes']]
|
||||
error = rejector.reject_batch_change(completed_batch['id'], status=400)
|
||||
assert_that(error, is_("Batch change " + completed_batch['id'] +
|
||||
" is not pending approval, so it cannot be rejected."))
|
||||
" is not pending review, so it cannot be rejected."))
|
||||
finally:
|
||||
clear_zoneid_rsid_tuple_list(to_delete, client)
|
||||
|
||||
|
Reference in New Issue
Block a user