Match

class aws_cdk.integ_tests_alpha.Match

Bases: object

(experimental) Partial and special matching during assertions.

Stability:

experimental

Stability:

experimental

Static Methods

classmethod array_with(pattern)

(experimental) Matches the specified pattern with the array found in the same relative path of the target.

The set of elements (or matchers) must be in the same order as would be found.

Parameters:

pattern (Sequence[Any]) – the pattern to match.

Stability:

experimental

Return type:

Mapping[str, List[Any]]

classmethod object_like(pattern)

(experimental) Matches the specified pattern to an object found in the same relative path of the target.

The keys and their values (or matchers) must be present in the target but the target can be a superset.

Parameters:

pattern (Mapping[str, Any]) – the pattern to match.

Stability:

experimental

Return type:

Mapping[str, Mapping[str, Any]]

classmethod serialized_json(pattern)

(experimental) Matches any string-encoded JSON and applies the specified pattern after parsing it.

Parameters:

pattern (Mapping[str, Any]) – the pattern to match after parsing the encoded JSON.

Stability:

experimental

Return type:

Mapping[str, Mapping[str, Any]]

classmethod string_like_regexp(pattern)

(experimental) Matches targets according to a regular expression.

Parameters:

pattern (str) –

Stability:

experimental

Return type:

Mapping[str, str]