~ubuntu-branches/ubuntu/maverick/gunicorn/maverick

« back to all changes in this revision

Viewing changes to tests/002-test-invalid-requests.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-07-16 10:44:12 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100716104412-iddgoj0lss2hxg7q
Tags: 0.10.0-1
* New upstream release.
* Add python-setproctitle to Suggests. Thanks to Örjan Persson
  <orange@fobie.net>.
* Bump Standards-Version to 3.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -
 
2
#
 
3
# This file is part of gunicorn released under the MIT license. 
 
4
# See the NOTICE for more information.
 
5
 
 
6
import t
 
7
import treq
 
8
 
 
9
import glob
 
10
import os
 
11
dirname = os.path.dirname(__file__)
 
12
reqdir = os.path.join(dirname, "requests", "invalid")
 
13
 
 
14
def test_http_parser():
 
15
    for fname in glob.glob(os.path.join(reqdir, "*.http")):
 
16
        expect = treq.load_py(os.path.splitext(fname)[0] + ".py")
 
17
        req = treq.badrequest(fname, expect)
 
18
        yield (req.check,)