'Delete certificate'

@ddt.data('not_a_valid_asset_key{}.png', '/not_a_valid_asset_key{}.png')
def test_can_delete_certificate_with_invalid_signatory(self, signatory_path):

    self._add_course_certificates(count=2, signatory_count=1, asset_path_format=signatory_path)
    response = self.client.delete(self._url(cid=1), content_type='application/json', HTTP_ACCEPT='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest')
    self.assertEqual(response.status_code, 204)
    self.assert_event_emitted('edx.certificate.configuration.deleted', course_id=unicode(self.course.id), configuration_id='1')
    self.reload_course()
    certificates = self.course.certificates['certificates']
    self.assertEqual(len(certificates), 1)
    self.assertEqual(certificates[0].get('name'), 'Name    0')
    self.assertEqual(certificates[0].get('description'), 'Description    0')
