From 5b6d3a80bbb57faa1de1cc7730d28b0678b0bdee Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 3 May 2015 13:54:52 +1200 Subject: websockets: code specification --- test/tutils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/tutils.py') diff --git a/test/tutils.py b/test/tutils.py index f188029d..2387e752 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -2,6 +2,7 @@ import tempfile import os import re import shutil +import cStringIO from contextlib import contextmanager from libpathod import utils, test, pathoc, pathod, language import requests @@ -137,3 +138,9 @@ def raises(exc, obj, *args, **kwargs): raise AssertionError("No exception raised.") test_data = utils.Data(__name__) + + +def render(r, settings=language.Settings()): + s = cStringIO.StringIO() + assert language.serve(r, s, settings) + return s.getvalue() -- cgit v1.2.3