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))
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))
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))
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))