tests: Add quteproc.get_content.
This commit is contained in:
parent
31892b437e
commit
76143574ef
@ -263,6 +263,15 @@ class QuteProc(testprocess.Process):
|
||||
print(data)
|
||||
return yaml.load(data)
|
||||
|
||||
def get_content(self):
|
||||
"""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))
|
||||
|
||||
with open(path, 'r', encoding='utf-8') as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
@pytest.yield_fixture(scope='module')
|
||||
def quteproc(qapp, httpbin, request):
|
||||
|
Loading…
Reference in New Issue
Block a user