'Test certificates have unique ids'

def test_assign_unique_identifier_to_certificates(self):

    self._add_course_certificates(count=2)
    json_data = {u'version': CERTIFICATE_SCHEMA_VERSION, u'name': u'New    test    certificate', u'description': u'New    test    description', u'is_active': True, u'signatories': []}
    response = self.client.post(self._url(), data=json.dumps(json_data), content_type='application/json', HTTP_ACCEPT='application/json', HTTP_X_REQUESTED_WITH='XMLHttpRequest')
    new_certificate = json.loads(response.content)
    for prev_certificate in self.course.certificates['certificates']:
        self.assertNotEqual(new_certificate.get('id'), prev_certificate.get('id'))
