def test_round_trip(self):
# Load some data
cmd = 'kinto-wizard {} --server={} --auth={}'
load_cmd = cmd.format("load {}".format(self.file),
self.server, self.auth)
sys.argv = load_cmd.split(" ")
main()
cmd = 'kinto-wizard {} --server={} --auth={} --full'
load_cmd = cmd.format("dump", self.server, self.auth)
sys.argv = load_cmd.split(" ")
output = io.StringIO()
with redirect_stdout(output):
main()
output.flush()
# Check that identical to original file.
generated = output.getvalue()
with open(self.file) as f:
assert f.read() == generated
评论列表
文章目录