def METHOD_NAME(self, test_id, sagews):
    # assign x to U+201C (could use U+201D) to trigger bad quote warning
    code = "“"
    m = conftest.message.execute_code(code=code, id=test_id)
    sagews.send_json(m)
    # expect 2 messages from worksheet client
    # 1 stderr Error in lines 1-1
    typ, mesg = sagews.recv()
    assert typ == 'json'
    assert mesg['id'] == test_id
    assert 'stderr' in mesg
    assert 'non-ascii' in mesg['stderr']
    if 'should be replaced by < " >' not in mesg['stderr']:
        typ, mesg = sagews.recv()
        assert typ == 'json'
        assert mesg['id'] == test_id
        assert 'stderr' in mesg
        assert 'should be replaced by < " >' in mesg['stderr']
    conftest.recv_til_done(sagews, test_id)