summaryrefslogtreecommitdiff
path: root/test/perf/wsgi.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2008-01-12 22:03:42 +0000
committerJason Kirtland <jek@discorporate.us>2008-01-12 22:03:42 +0000
commit17d3c8764e020379e54053bca0b0a2bc71d48aa0 (patch)
tree0b46f1ddc57292b8f5bfbc28ab1679230f63e426 /test/perf/wsgi.py
parentc194962019d1bc7322e20b82c33aa1bab3bc2a28 (diff)
downloadsqlalchemy-17d3c8764e020379e54053bca0b0a2bc71d48aa0.tar.gz
- testbase is gone, replaced by testenv
- Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase - testing.db has the configured db - Fixed up the perf/* scripts
Diffstat (limited to 'test/perf/wsgi.py')
-rw-r--r--test/perf/wsgi.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/perf/wsgi.py b/test/perf/wsgi.py
index d22eeb76a..6fc8149bc 100644
--- a/test/perf/wsgi.py
+++ b/test/perf/wsgi.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
"""Uses ``wsgiref``, standard in Python 2.5 and also in the cheeseshop."""
-import testbase
+import testenv; testenv.configure_for_tests()
from sqlalchemy import *
from sqlalchemy.orm import *
import thread
@@ -14,8 +14,8 @@ logging.basicConfig()
logging.getLogger('sqlalchemy.pool').setLevel(logging.INFO)
threadids = set()
-meta = MetaData(testbase.db)
-foo = Table('foo', meta,
+meta = MetaData(testing.db)
+foo = Table('foo', meta,
Column('id', Integer, primary_key=True),
Column('data', String(30)))
class Foo(object):
@@ -41,7 +41,7 @@ def serve(environ, start_response):
" total threads ", len(threadids))
return [str("\n".join([x.data for x in l]))]
-
+
if __name__ == '__main__':
from wsgiref import simple_server
try:
@@ -51,5 +51,3 @@ if __name__ == '__main__':
server.serve_forever()
finally:
meta.drop_all()
-
-