events initated first endpoint tested
This commit is contained in:
@@ -37,7 +37,7 @@ class Event:
|
||||
REQUEST_VALIDATOR: Optional[Any]
|
||||
DESCRIPTION: str
|
||||
LANGUAGE_MODELS: list
|
||||
RESPONSE_VALIDATOR_STATIC: str
|
||||
STATICS: str
|
||||
EXTRA_OPTIONS: Optional[Dict[str, Any]] = None
|
||||
endpoint_callable: Any
|
||||
|
||||
@@ -47,7 +47,7 @@ class Event:
|
||||
key: str | UUID,
|
||||
description: str,
|
||||
language_models: list[Dict[str, Dict]],
|
||||
response_validation_static: str = None,
|
||||
statics: str = None,
|
||||
request_validator: Optional[Any] = None,
|
||||
response_validator: Optional[Any] = None,
|
||||
extra_options: Optional[Dict[str, Any]] = None,
|
||||
@@ -56,14 +56,14 @@ class Event:
|
||||
self.KEY_ = key
|
||||
self.REQUEST_VALIDATOR = request_validator
|
||||
self.RESPONSE_VALIDATOR = response_validator
|
||||
self.RESPONSE_VALIDATOR_STATIC = response_validation_static
|
||||
self.STATICS = statics
|
||||
self.LANGUAGE_MODELS = language_models
|
||||
self.DESCRIPTION = description
|
||||
self.EXTRA_OPTIONS = extra_options
|
||||
|
||||
@property
|
||||
def is_static_response(self):
|
||||
return bool(self.RESPONSE_VALIDATOR_STATIC)
|
||||
return bool(self.STATICS)
|
||||
|
||||
@property
|
||||
def static_response(self):
|
||||
@@ -73,7 +73,7 @@ class Event:
|
||||
if self.is_static_response:
|
||||
static_response = RedisActions.get_json(
|
||||
list_keys=[
|
||||
f"{RedisValidationKeysAction.static_response_key}:{self.RESPONSE_VALIDATOR_STATIC}"
|
||||
f"{RedisValidationKeysAction.static_response_key}:{self.STATICS}"
|
||||
]
|
||||
)
|
||||
if static_response.status:
|
||||
|
||||
Reference in New Issue
Block a user