Match value by its type.
Use this class when you only need to check value type.
.. code-block:: python
assert response.json() == {
'order_id': matching.IsInstance(str),
'weight': matching.IsInstance([int, float]), ... }
Definition at line 105 of file matching.py.
Public Member Functions | |
| __init__ (self, types) | |
| __repr__ (self) | |
| __eq__ (self, other) | |
Protected Attributes | |
| _types = types | |
| testsuite.matching.IsInstance.__init__ | ( | self, | |
| types ) |
Definition at line 121 of file matching.py.
| testsuite.matching.IsInstance.__eq__ | ( | self, | |
| other ) |
Definition at line 131 of file matching.py.
| testsuite.matching.IsInstance.__repr__ | ( | self | ) |
Definition at line 124 of file matching.py.
|
protected |
Definition at line 122 of file matching.py.