review/tests/test_encoding.py @ 9cd3f1057ae1
api: factor out the hgrf logic into reusable functions
author |
Steve Losh <steve@stevelosh.com> |
date |
Tue, 20 Jul 2010 19:43:02 -0400 |
parents |
1b9066798f87 |
children |
bef3dce04be6 |
# coding=utf-8
#
import os
from nose import with_setup
from util import setup_reviewed_sandbox, teardown_sandbox, review, should_fail_with
from util import get_datastore_repo, get_sandbox_repo, get_ui
from util import check_comment_exists_on_line
from .. import api, messages, rutil
from mercurial.node import hex
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_comment_encoding():
review(comment=True, message=rutil.tolocal(u'Téstíng.'))
output = review()
assert messages.REVIEW_LOG_COMMENT_LINE % rutil.tolocal(u'Téstíng.') in output
@with_setup(setup_reviewed_sandbox, teardown_sandbox)
def test_signoff_encoding():
review(signoff=True, message=rutil.tolocal(u'Téstíng.'))
output = review()
assert messages.REVIEW_LOG_SIGNOFF_LINE % rutil.tolocal(u'Téstíng.') in output