'Test required fields are absent.'

def test_required_fields_are_absent(self):

    bad_jsons = [{u'description': 'Test    description', u'version': CERTIFICATE_SCHEMA_VERSION}, {}]
    for bad_json in bad_jsons:
        response = self.client.post(self._url(), data=json.dumps(bad_json), content_type='application/json', HTTP_ACCEPT='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest')
        self.assertEqual(response.status_code, 400)
        self.assertNotIn('Location', response)
        content = json.loads(response.content)
        self.assertIn('error', content)
