summaryrefslogtreecommitdiff
path: root/webtest
diff options
context:
space:
mode:
authorGael Pasgrimaud <gael@gawel.org>2022-01-19 08:55:34 +0100
committerGitHub <noreply@github.com>2022-01-19 08:55:34 +0100
commitb0426fc2952ba45de75cbd37db350281dce101df (patch)
tree821d6e8d5cf77a4505042a03fb1fb4905dd36b28 /webtest
parent2719819e5ac26bdc0cf39879ca4d3879ae9eb0c9 (diff)
parentd1dbc25f53a031d03112cb1e44f4a060cf3665cd (diff)
downloadwebtest-master.tar.gz
Merge pull request #242 from azmeuk/issue-240-multiple-file-inputmaster
Support for multiple file input
Diffstat (limited to 'webtest')
-rw-r--r--webtest/app.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/webtest/app.py b/webtest/app.py
index 4ea19e9..9e3155e 100644
--- a/webtest/app.py
+++ b/webtest/app.py
@@ -500,7 +500,10 @@ class TestApp:
except: # pragma: no cover
raise # field name are always ascii
if isinstance(value, forms.File):
- if value.value:
+ if "multiple" in value.attrs:
+ for file in value.value:
+ _append_file([key] + list(file))
+ elif value.value:
_append_file([key] + list(value.value))
else:
# If no file was uploaded simulate an empty file with no