summaryrefslogtreecommitdiff
path: root/webtest
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-09-15 17:29:42 +0000
committerianb <devnull@localhost>2007-09-15 17:29:42 +0000
commit4cc144a74e846bd6d0a41f38f44a5ae55dc9c8ef (patch)
treed3edac30191721a31c8e59c49b835ef93208c84f /webtest
parent9ffe164ffc3ada57f562481094f04c67a4277925 (diff)
downloadwebtest-4cc144a74e846bd6d0a41f38f44a5ae55dc9c8ef.tar.gz
allow namespaces in tag names; set CONTENT_TYPE on POSTs
Diffstat (limited to 'webtest')
-rw-r--r--webtest/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/webtest/__init__.py b/webtest/__init__.py
index f3617b4..021c181 100644
--- a/webtest/__init__.py
+++ b/webtest/__init__.py
@@ -162,6 +162,8 @@ class TestApp(object):
content_type, params = self.encode_multipart(
params, upload_files)
environ['CONTENT_TYPE'] = content_type
+ elif params:
+ environ.setdefault('CONTENT_TYPE', 'application/x-www-form-urlencoded')
if '?' in url:
url, environ['QUERY_STRING'] = url.split('?', 1)
else:
@@ -412,7 +414,7 @@ class TestResponse(Response):
page.
""")
- _tag_re = re.compile(r'<(/?)([a-z0-9_\-]*)(.*?)>', re.S|re.I)
+ _tag_re = re.compile(r'<(/?)([:a-z0-9_\-]*)(.*?)>', re.S|re.I)
def _parse_forms(self):
forms = self._forms_indexed = {}