Exemplo n.º 1
0
def test_file():
    infile = StringIO(mfile)
    outfile = StringIO()

    config = dict(ask_all=False, comments=False)

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output))
Exemplo n.º 2
0
def test_custom():
    infile = StringIO(mfile_custom)
    outfile = StringIO()

    config = dict(
        ask_all=False, comments=False, autoreplace_prefix="__LOCALIZE_ME_PLEASE", bundle="mybundle", table="mytable"
    )

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output_custom))
Exemplo n.º 3
0
def test_file():
    infile = StringIO(mfile)
    outfile = StringIO()

    config = dict(
        ask_all=False,
        comments=False,
    )

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output))
Exemplo n.º 4
0
def test_custom():
    infile = StringIO(mfile_custom)
    outfile = StringIO()

    config = dict(ask_all=False,
                  comments=False,
                  autoreplace_prefix="__LOCALIZE_ME_PLEASE",
                  bundle="mybundle",
                  table="mytable")

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output_custom))