File: README_fixt.py

package info (click to toggle)
wsgiproxy2 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 156 kB
  • sloc: python: 664; makefile: 128
file content (17 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8 -*-
from doctest import ELLIPSIS
from webtest.debugapp import debug_app
from webtest.http import StopableWSGIServer


def setup_test(test):
    test.globs['server'] = StopableWSGIServer.create(debug_app)
    test.globs['application_url'] = test.globs['server'].application_url
    for example in test.examples:
        example.options.setdefault(ELLIPSIS, 1)

setup_test.__test__ = False


def teardown_test(test):
    test.globs['server'].shutdown()