File: fixture.py

package info (click to toggle)
pastewebkit 1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 536 kB
  • ctags: 662
  • sloc: python: 3,346; makefile: 41
file content (14 lines) | stat: -rw-r--r-- 349 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from paste.fixture import *
import os
from paste.deploy import loadapp

here = os.path.dirname(__file__)

def makeapp(config_file, name=None):
    uri = 'config:' + config_file
    app = loadapp(uri, name=name,
                  relative_to=os.path.join(here, 'sample_configs'))
    testapp = TestApp(app)
    return testapp