Example #1
0
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)))
Example #2
0
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)))
Example #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)))
Example #4
0
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)))
Example #5
0
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)))
Example #6
0
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)))