Пример #1
0
 def test_deadline(self):
     timeout = 5
     now = dt.datetime.now(dt.timezone.utc).astimezone()
     now += dt.timedelta(0, float(timeout))
     timeout_data = data.cloudevent_request_with_body.copy()
     timeout_data["extensions"]["deadline"] = now.isoformat()
     self.deadline(timeout, data.to_stream(timeout_data))
Пример #2
0
 def test_default_deadline(self):
     timeout_data = data.cloudevent_request_with_body.copy()
     timeout_data["extensions"]["deadline"] = None
     self.default_deadline(data.to_stream(timeout_data))
Пример #3
0
 def test_coro_func(self):
     income_data = data.to_stream(data.cloudevent_request_without_body)
     self.coro_func(income_data)
Пример #4
0
 def test_parse_request_with_data(self):
     income_data = data.to_stream(data.cloudevent_request_with_body)
     self.parse_request_with_data(income_data)
Пример #5
0
 def test_custom_response_object(self):
     income_data = data.to_stream(data.cloudevent_request_with_body)
     self.custom_response_object(income_data)
Пример #6
0
 def test_override_content_type(self):
     income_data = data.to_stream(data.cloudevent_request_without_body)
     self.override_content_type(income_data)
Пример #7
0
 def test_default_deadline(self):
     timeout_data = data.json_request_with_body.copy()
     timeout_data["deadline"] = None
     self.default_deadline(data.to_stream(timeout_data))
Пример #8
0
 def test_none_func(self):
     income_data = data.to_stream(data.json_request_without_body)
     self.none_func(income_data)
Пример #9
0
 def test_errored_func(self):
     income_data = data.to_stream(data.json_request_without_body)
     self.errored_func(income_data)
Пример #10
0
 def test_parse_request_with_data(self):
     income_data = data.to_stream(data.json_request_with_body)
     self.parse_request_with_data(income_data)