'Test for case with no certificate available'

def test_no_certificate_for_user(self):

    self.client.login(username=self.student_no_cert.username, password=USER_PASSWORD)
    resp = self.client.get(self.get_url(self.student_no_cert.username))
    self.assertEqual(resp.status_code, status.HTTP_404_NOT_FOUND)
    self.assertIn('error_code', resp.data)
    self.assertEqual(resp.data['error_code'], 'no_certificate_for_user')
