userver: testsuite.matching.RegexString Class Reference
Loading...
Searching...
No Matches
testsuite.matching.RegexString Class Reference

Detailed Description

Match string with regular expression.

.. code-block:: python

assert response.json() == { 'order_id': matching.RegexString('^[0-9a-f]*$'), ... }

Definition at line 46 of file matching.py.

Inheritance diagram for testsuite.matching.RegexString:

Public Member Functions

 __init__ (self, pattern)
 __repr__ (self)
 __eq__ (self, other)

Protected Attributes

 _pattern = re.compile(pattern)

Constructor & Destructor Documentation

◆ __init__()

testsuite.matching.RegexString.__init__ ( self,
pattern )

Definition at line 59 of file matching.py.

Member Function Documentation

◆ __eq__()

testsuite.matching.RegexString.__eq__ ( self,
other )

Definition at line 65 of file matching.py.

◆ __repr__()

testsuite.matching.RegexString.__repr__ ( self)

Definition at line 62 of file matching.py.

Member Data Documentation

◆ _pattern

testsuite.matching.RegexString._pattern = re.compile(pattern)
protected

Definition at line 60 of file matching.py.


The documentation for this class was generated from the following file: