mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-08 17:29:34 +08:00
change: rename to StepRequestExtraction
This commit is contained in:
@@ -172,11 +172,11 @@ class StepValidation(object):
|
|||||||
return self.__t_step
|
return self.__t_step
|
||||||
|
|
||||||
|
|
||||||
class StepExtraction(object):
|
class StepRequestExtraction(object):
|
||||||
def __init__(self, step: TStep):
|
def __init__(self, step: TStep):
|
||||||
self.__t_step = step
|
self.__t_step = step
|
||||||
|
|
||||||
def with_jmespath(self, jmes_path: Text, var_name: Text) -> "StepExtraction":
|
def with_jmespath(self, jmes_path: Text, var_name: Text) -> "StepRequestExtraction":
|
||||||
self.__t_step.extract[var_name] = jmes_path
|
self.__t_step.extract[var_name] = jmes_path
|
||||||
return self
|
return self
|
||||||
|
|
||||||
@@ -238,8 +238,8 @@ class RequestWithOptionalArgs(object):
|
|||||||
# def hooks(self):
|
# def hooks(self):
|
||||||
# pass
|
# pass
|
||||||
|
|
||||||
def extract(self) -> StepExtraction:
|
def extract(self) -> StepRequestExtraction:
|
||||||
return StepExtraction(self.__t_step)
|
return StepRequestExtraction(self.__t_step)
|
||||||
|
|
||||||
def validate(self) -> StepValidation:
|
def validate(self) -> StepValidation:
|
||||||
return StepValidation(self.__t_step)
|
return StepValidation(self.__t_step)
|
||||||
@@ -305,7 +305,7 @@ class Step(object):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
step: Union[
|
step: Union[
|
||||||
StepValidation, StepExtraction, RequestWithOptionalArgs, RunTestCase
|
StepValidation, StepRequestExtraction, RequestWithOptionalArgs, RunTestCase
|
||||||
],
|
],
|
||||||
):
|
):
|
||||||
self.__t_step = step.perform()
|
self.__t_step = step.perform()
|
||||||
|
|||||||
Reference in New Issue
Block a user