Filters
formatting...Grizzly native templating filters that can be used to manipulate variable values where they are used.
b64decode(value)
b64encode(value)
fromtestdata(value)
Convert testdata object to a dictionary.
Nested testdata is a namedtuple
object, e.g. AtomicCsvReader.test
, where column values are accessed with
AtomicCsvReader.test.header1
. If anything should be done for the whole row/item it must be converted to a
dictionary.
Example
Given value of variable "AtomicCsvReader.test" is "test.csv"
Then log message "test={{ AtomicCsvReader.test | fromtestdata | stringify }}"
Arguments
Name | Type | Description | Default |
---|---|---|---|
value
|
NamedTuple
|
testdata objekt |
required |
literal_eval(value)
Evaluate python objects serialized as strings.
Returns the string as the actual python object.
Example
Given value of variable "value" is "{'hello': 'world'}"
Then log message "value: {{ value | literal_eval }}"
Arguments
Name | Type | Description | Default |
---|---|---|---|
value
|
str
|
string representation of python object |
required |
stringify(value)
Convert python object to JSON string.
Convert any (valid) python object to a JSON string.
Example
Given value of variable "AtomicCsvReader.test" is "test.csv"
Then log message "test={{ AtomicCsvReader.test | fromtestdata | stringify }}"
Arguments
Name | Type | Description | Default |
---|---|---|---|
value
|
JsonSerializable
|
value to convert to JSON string |
required |