'Tests user without write permissions on course should not able to create certificate'

def test_cannot_create_certificate_if_user_has_no_write_permissions(self):

    user = UserFactory()
    self.client.login(username=user.username, password='test')
    response = self.client.ajax_post(self._url(), data=CERTIFICATE_JSON)
    self.assertEqual(response.status_code, 403)
