allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [allura] 01/01: [#8320] fix for multiple file uploads; some test coverage
Date Wed, 07 Aug 2019 17:53:39 GMT
This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8320b
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e2c8dbeff74aa60331f0538414a4ecf8f1c3672b
Author: Dave Brondsema <dave@brondsema.net>
AuthorDate: Wed Aug 7 13:53:21 2019 -0400

    [#8320] fix for multiple file uploads; some test coverage
---
 Allura/allura/lib/widgets/discuss.py              | 1 +
 Allura/allura/tests/functional/test_discuss.py    | 3 ++-
 ForgeBlog/forgeblog/tests/functional/test_root.py | 3 ++-
 requirements.txt                                  | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py
index f988418..5d9be46 100644
--- a/Allura/allura/lib/widgets/discuss.py
+++ b/Allura/allura/lib/widgets/discuss.py
@@ -32,6 +32,7 @@ from allura import model as M
 
 class NullValidator(fev.FancyValidator):
     perform_validation = True
+    accept_iterator = True
 
     def _to_python(self, value, state):
         return value
diff --git a/Allura/allura/tests/functional/test_discuss.py b/Allura/allura/tests/functional/test_discuss.py
index 37b5865..978ec33 100644
--- a/Allura/allura/tests/functional/test_discuss.py
+++ b/Allura/allura/tests/functional/test_discuss.py
@@ -474,7 +474,8 @@ class TestAttachment(TestDiscussBase):
         params[post_form.find('textarea')['name']] = 'Reply'
         r = self.app.post(self.post_link + 'reply',
                           params=params,
-                          upload_files=[('file_info', 'test.txt', 'HiThere!')])
+                          upload_files=[('file_info', 'test.txt', 'HiThere!'),
+                                        ('file_info', 'test2.txt', 'HiAgain!')])
         r = self.app.get(self.thread_link)
         assert "test.txt" in r
 
diff --git a/ForgeBlog/forgeblog/tests/functional/test_root.py b/ForgeBlog/forgeblog/tests/functional/test_root.py
index 8a94537..47b4d87 100644
--- a/ForgeBlog/forgeblog/tests/functional/test_root.py
+++ b/ForgeBlog/forgeblog/tests/functional/test_root.py
@@ -188,7 +188,8 @@ class Test(TestController):
     def test_post_attachments(self):
         # create
         upload = ('attachment', 'nums.txt', '123412341234')
-        self._post(extra_app_post_params=dict(upload_files=[upload]))
+        upload2 = ('attachment', 'more_nums.txt', '56789')
+        self._post(extra_app_post_params=dict(upload_files=[upload, upload2]))
 
         # check it is listed
         d = self._blog_date()
diff --git a/requirements.txt b/requirements.txt
index b6ff390..e4193cf 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -26,7 +26,7 @@ cryptography==2.6.1
 datadiff==2.0.0
 decorator==4.4.0
 docutils==0.14            # via pypeline
-easywidgets==0.3.4
+easywidgets==0.3.5
 emoji==0.5.1
 enum34==1.1.6             # via astroid, colander, cryptography, traitlets
 faulthandler==3.1


Mime
View raw message