acai-aws 2.3.2__py3-none-any.whl → 2.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- acai_aws/apigateway/response.py +7 -1
- {acai_aws-2.3.2.dist-info → acai_aws-2.3.3.dist-info}/METADATA +1 -1
- {acai_aws-2.3.2.dist-info → acai_aws-2.3.3.dist-info}/RECORD +7 -7
- tests/acai_aws/apigateway/test_response.py +14 -0
- {acai_aws-2.3.2.dist-info → acai_aws-2.3.3.dist-info}/WHEEL +0 -0
- {acai_aws-2.3.2.dist-info → acai_aws-2.3.3.dist-info}/licenses/LICENSE +0 -0
- {acai_aws-2.3.2.dist-info → acai_aws-2.3.3.dist-info}/top_level.txt +0 -0
acai_aws/apigateway/response.py
CHANGED
|
@@ -88,7 +88,13 @@ class Response:
|
|
|
88
88
|
|
|
89
89
|
@property
|
|
90
90
|
def has_errors(self):
|
|
91
|
-
|
|
91
|
+
if self.__body is None or self.__body == '':
|
|
92
|
+
self.__body = {}
|
|
93
|
+
return False
|
|
94
|
+
try:
|
|
95
|
+
return 'errors' in self.__body
|
|
96
|
+
except TypeError:
|
|
97
|
+
return False
|
|
92
98
|
|
|
93
99
|
@property
|
|
94
100
|
def body(self):
|
|
@@ -6,7 +6,7 @@ acai_aws/apigateway/endpoint.py,sha256=k9RzPs4FFkTE24kNq5KDXKhcwGQ-RzCKGREz0twlb
|
|
|
6
6
|
acai_aws/apigateway/exception.py,sha256=e8DKUcu5b3Q839SKP55bdoZTkakOd0e6CQQK6_ZBI5k,557
|
|
7
7
|
acai_aws/apigateway/request.py,sha256=VQzmtCJZWof-XMuZ22G2L_LwMF4tLchaDygz_IsUpFg,5239
|
|
8
8
|
acai_aws/apigateway/requirements.py,sha256=dOeBgKstAxVKgZ10-cO7yNNDQwn6YgRhg8ZSaya49Uc,1598
|
|
9
|
-
acai_aws/apigateway/response.py,sha256=
|
|
9
|
+
acai_aws/apigateway/response.py,sha256=q7qXzNF0pJuzz3Kh5Ybtcj5LAcsmZW5wcuVhHpu_qeM,4228
|
|
10
10
|
acai_aws/apigateway/router.py,sha256=QoFiYE8Ip57MtVYOO26Ef8EZAeU2D0FMWqgwStBgC_c,5305
|
|
11
11
|
acai_aws/apigateway/resolver/__init__.py,sha256=P5dY_bsGzxync7i9oZBmXhLHwY1Dr94EAeMF4RLJ4co,5041
|
|
12
12
|
acai_aws/apigateway/resolver/cache.py,sha256=myABSHkAx7ZEsW8_NWCGccnICJ9PXmY43GHzPLR28_I,1117
|
|
@@ -72,7 +72,7 @@ acai_aws/sqs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
72
72
|
acai_aws/sqs/event.py,sha256=u5QYrb-XLy2mhzi3v55je6N6vASS3ywzjIBDjm_n32Q,264
|
|
73
73
|
acai_aws/sqs/record.py,sha256=NIoqzh2rS9pG8pQpwAsP_mghcy7B9PRBEh4j_up5sjQ,1923
|
|
74
74
|
acai_aws/sqs/requirements.py,sha256=4QR0LIrDqF1CPSAroscX3EAys-dbqWMFmOhqyILcViw,116
|
|
75
|
-
acai_aws-2.3.
|
|
75
|
+
acai_aws-2.3.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
76
76
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
tests/acai_aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
78
78
|
tests/acai_aws/apigateway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -81,7 +81,7 @@ tests/acai_aws/apigateway/test_endpoint.py,sha256=ZqL1tBKaBt6bUXj9bGgh2-oVAeTzmk
|
|
|
81
81
|
tests/acai_aws/apigateway/test_main.py,sha256=BDiGW-MKV16yW2Z9-I_DmNmNJGUI0Y9jbOn4XjkKVos,821
|
|
82
82
|
tests/acai_aws/apigateway/test_request.py,sha256=11dCHCTMt0t0H8hnzQ_bQIPmx_exWTTVHf9RqvgBCC4,9548
|
|
83
83
|
tests/acai_aws/apigateway/test_requirements.py,sha256=I6mYhz4fJn9Mh0jBT8R65QkyQIjjgvo_dQ_NWgHF0vc,3028
|
|
84
|
-
tests/acai_aws/apigateway/test_response.py,sha256=
|
|
84
|
+
tests/acai_aws/apigateway/test_response.py,sha256=15H67WjUfdSbFqTzA5g1dIp85ERoWvPg7wFKRlqhet0,4435
|
|
85
85
|
tests/acai_aws/apigateway/openapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
86
86
|
tests/acai_aws/apigateway/openapi/test_file_writer.py,sha256=RdJRb9XR3YrM3q2B2WsYynNX8T2VD_v1s7_1sQYRkgM,598
|
|
87
87
|
tests/acai_aws/apigateway/openapi/test_generator.py,sha256=ieqCE4SFItG3CYUtSsJxxQZa0fHTRexGyYPx-Kx7efs,5434
|
|
@@ -154,7 +154,7 @@ tests/acai_aws/sqs/test_event.py,sha256=d8JBttuLND_qBVdLAoqtp-_qJ5NXxD6Ai2IFmUqK
|
|
|
154
154
|
tests/acai_aws/sqs/test_record.py,sha256=RkWpc24A-f4bw1VyMM5mEp97QCk4i-Weu6CFP0-VlbU,1602
|
|
155
155
|
tests/acai_aws/sqs/test_requirements.py,sha256=wcV99aXQIL8t6gIeUO0EgX9c_hA0IV3rg2Ar1g1SYjg,904
|
|
156
156
|
tests/mocks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
157
|
-
acai_aws-2.3.
|
|
158
|
-
acai_aws-2.3.
|
|
159
|
-
acai_aws-2.3.
|
|
160
|
-
acai_aws-2.3.
|
|
157
|
+
acai_aws-2.3.3.dist-info/METADATA,sha256=2c8XVU2hP5FhLzaOA68w11-k0bcSS6FXHfbgEJqCqtU,15175
|
|
158
|
+
acai_aws-2.3.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
159
|
+
acai_aws-2.3.3.dist-info/top_level.txt,sha256=A6vdhfU7MqNqO9rGdH1Z2EEqpnbIIyb4PsHJbRktbbI,15
|
|
160
|
+
acai_aws-2.3.3.dist-info/RECORD,,
|
|
@@ -107,6 +107,20 @@ class ResponseTest(unittest.TestCase):
|
|
|
107
107
|
self.response.headers = ('Content-Type', 'text/html')
|
|
108
108
|
self.assertEqual('text/html', self.response.content_type)
|
|
109
109
|
|
|
110
|
+
def test_has_errors_with_none_body(self):
|
|
111
|
+
self.response.body = None
|
|
112
|
+
self.assertEqual(self.response.has_errors, False)
|
|
113
|
+
self.assertDictEqual(self.response.raw, {})
|
|
114
|
+
|
|
115
|
+
def test_has_errors_with_empty_string_body(self):
|
|
116
|
+
self.response.body = ''
|
|
117
|
+
self.assertEqual(self.response.has_errors, False)
|
|
118
|
+
self.assertDictEqual(self.response.raw, {})
|
|
119
|
+
|
|
120
|
+
def test_has_errors_with_non_iterable_body(self):
|
|
121
|
+
self.response.body = 12345
|
|
122
|
+
self.assertEqual(self.response.has_errors, False)
|
|
123
|
+
|
|
110
124
|
def test_raw(self):
|
|
111
125
|
self.response.body = {'raw': True}
|
|
112
126
|
self.assertDictEqual({'raw': True}, self.response.raw)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|