예제 #1
0
파일: test_l10n.py 프로젝트: stasm/tower
def test_extract_tower_template():
    fileobj = StringIO(TEST_TEMPLATE_INPUT)
    method = "tower.management.commands.extract.extract_tower_template"
    output = fake_extract_from_dir(filename="filename", fileobj=fileobj, method=method)

    # god help you if these are ever unequal
    eq_(TEST_TEMPLATE_OUTPUT, unicode(create_pofile_from_babel(output)))
예제 #2
0
파일: test_l10n.py 프로젝트: davedash/tower
def test_extract_tower_python_backwards_compatible():
    fileobj = StringIO(TEST_PO_INPUT)
    method = "tower.management.commands.extract.extract_tower_python"
    output = fake_extract_from_dir(filename="filename", fileobj=fileobj, method=method)

    # god help you if these are ever unequal
    eq_(TEST_PO_OUTPUT, unicode(create_pofile_from_babel(output)))
예제 #3
0
def test_extract_tower_template():
    fileobj = BytesIO(TEST_TEMPLATE_INPUT)
    method = 'tower.extract_tower_template'
    output = fake_extract_from_dir(filename="filename", fileobj=fileobj,
                                   method=method)

    # god help you if these are ever unequal
    eq_(TEST_TEMPLATE_OUTPUT, unicode(create_pofile_from_babel(output)))
예제 #4
0
파일: test_l10n.py 프로젝트: Osmose/tower
def test_extract_tower_python():
    fileobj = StringIO(TEST_PO_INPUT)
    method = 'tower.extract_tower_python'
    output = fake_extract_from_dir(filename="filename", fileobj=fileobj,
                                   method=method)

    # god help you if these are ever unequal
    eq_(TEST_PO_OUTPUT, unicode(create_pofile_from_babel(output)))
예제 #5
0
파일: test_l10n.py 프로젝트: xethorn/tower
def test_extract_tower_template_backwards_compatible():
    fileobj = StringIO(TEST_TEMPLATE_INPUT)
    method = 'tower.management.commands.extract.extract_tower_template'
    output = fake_extract_from_dir(filename="filename",
                                   fileobj=fileobj,
                                   method=method)

    # god help you if these are ever unequal
    eq_(TEST_TEMPLATE_OUTPUT, unicode(create_pofile_from_babel(output)))
예제 #6
0
파일: test_l10n.py 프로젝트: xethorn/tower
def test_extract_tower_python():
    fileobj = StringIO(TEST_PO_INPUT)
    method = 'tower.extract_tower_python'
    output = fake_extract_from_dir(filename="filename",
                                   fileobj=fileobj,
                                   method=method)

    # god help you if these are ever unequal
    eq_(TEST_PO_OUTPUT, unicode(create_pofile_from_babel(output)))