faust.livecheck.models
¶
LiveCheck - Models.
-
class
faust.livecheck.models.
State
[source]¶ Test execution status.
-
INIT
= 'INIT'¶
-
PASS
= 'PASS'¶
-
FAIL
= 'FAIL'¶
-
ERROR
= 'ERROR'¶
-
TIMEOUT
= 'TIMEOUT'¶
-
STALL
= 'STALL'¶
-
SKIP
= 'SKIP'¶
-
-
class
faust.livecheck.models.
SignalEvent
(signal_name, case_name, key, value, *, __strict__=True, __faust=None, **kwargs) → None[source]¶ Signal sent to test (see
faust.livecheck.signals.Signal
).-
signal_name
¶
-
case_name
¶
-
key
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
value
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
asdict
()¶
-
-
class
faust.livecheck.models.
TestExecution
(id, case_name, timestamp, test_args, test_kwargs, expires, *, __strict__=True, __faust=None, **kwargs) → None[source]¶ Requested test execution.
-
id
¶
-
case_name
¶
-
timestamp
¶
-
test_args
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
test_kwargs
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
expires
¶
-
classmethod
from_headers
(headers: Mapping) → Optional[faust.livecheck.models.TestExecution][source]¶ Create instance from mapping of HTTP/Kafka headers.
- Return type
-
as_headers
() → Mapping[source]¶ Return test metadata as mapping of HTTP/Kafka headers.
- Return type
Mapping
[~KT, +VT_co]
-
asdict
()¶
-
-
class
faust.livecheck.models.
TestReport
(case_name, state, signal_latency, test=None, runtime=None, error=None, traceback=None, *, __strict__=True, __faust=None, **kwargs) → None[source]¶ Report after test execution.
-
case_name
¶
-
state
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
test
¶ Describes a field.
Used for every field in Record so that they can be used in join’s /group_by etc.
Examples
>>> class Withdrawal(Record): ... account_id: str ... amount: float = 0.0
>>> Withdrawal.account_id <FieldDescriptor: Withdrawal.account_id: str> >>> Withdrawal.amount <FieldDescriptor: Withdrawal.amount: float = 0.0>
- Parameters
- Keyword Arguments
model (Type) – Model class the field belongs to.
parent (FieldDescriptorT) – parent field if any.
-
runtime
¶
-
signal_latency
¶
-
error
¶
-
traceback
¶
-
asdict
()¶
-