From b7323914b8bb96094c52ec77c9a65e16030c7e0a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 Nov 2015 18:22:20 +0100 Subject: [PATCH] tests: Add plain arg to quteprocess.get_contents. --- tests/integration/quteprocess.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 235d78fa2..284b6cfd1 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -263,11 +263,16 @@ class QuteProc(testprocess.Process): print(data) return yaml.load(data) - def get_content(self): + def get_content(self, plain=True): """Get the contents of the current page.""" with tempfile.TemporaryDirectory() as tmpdir: path = os.path.join(tmpdir, 'page') - self.send_cmd(':debug-dump-page --plain "{}"'.format(path)) + + if plain: + self.send_cmd(':debug-dump-page --plain "{}"'.format(path)) + else: + self.send_cmd(':debug-dump-page "{}"'.format(path)) + self.wait_for(category='message', loglevel=logging.INFO, message='Dumped page to {}.'.format(path))