summaryrefslogtreecommitdiff
path: root/tests/testpy3.py
blob: f08f5c445d8b860ec6c85debbe5206b0c50179cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import uwsgi


def app1(e, sr):
    print(e)
    sr('200 Ok', [('Content-Type', 'text/plain')])
    return b'i Am a Python 3.x bytestring'


def app2(e, sr):
    print(e)
    sr('404 Not Found', [('Content-Type', 'text/plain')])
    return b'i Am a Python 3.x Not Found page'

uwsgi.applications = {b'': app1, b'/test': app2}