2019-11-19 11:53:49 +08:00
|
|
|
commit dfd60ce7c656d95afc2e7c4c1e03be2982cc9a9d
|
|
|
|
|
Author: Kamil Páral <kparal@redhat.com>
|
|
|
|
|
Date: Tue Jun 26 12:06:37 2018 +0200
|
|
|
|
|
|
|
|
|
|
test_api: fix traceback
|
|
|
|
|
|
|
|
|
|
This is fixed:
|
|
|
|
|
```
|
|
|
|
|
Traceback (most recent call last):
|
|
|
|
|
File "/builddir/build/BUILD/flask-restful-0.3.6/tests/test_api.py", line 787, in test_fr_405
|
|
|
|
|
set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
|
|
|
|
|
TypeError: can only concatenate list (not "set") to list
|
|
|
|
|
```
|
|
|
|
|
|
2020-02-18 15:11:43 +08:00
|
|
|
diff --git tests/test_api.py tests/test_api.py
|
2019-11-19 11:53:49 +08:00
|
|
|
index 26447ae..f34b3f6 100644
|
2020-02-18 15:11:43 +08:00
|
|
|
--- tests/test_api.py
|
|
|
|
|
+++ tests/test_api.py
|
2019-11-19 11:53:49 +08:00
|
|
|
@@ -784,7 +784,7 @@ class APITestCase(unittest.TestCase):
|
|
|
|
|
allow = ', '.join(set(resp.headers.get_all('Allow')))
|
|
|
|
|
allow = set(method.strip() for method in allow.split(','))
|
|
|
|
|
self.assertEquals(allow,
|
|
|
|
|
- set(['HEAD', 'OPTIONS'] + HelloWorld.methods))
|
|
|
|
|
+ set(['HEAD', 'OPTIONS'] + list(HelloWorld.methods)))
|
|
|
|
|
|
|
|
|
|
def test_exception_header_forwarded(self):
|
|
|
|
|
"""Test that HTTPException's headers are extended properly"""
|