コード例 #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
ファイル: test_l10n.py プロジェクト: thijstriemstra/tower
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)))