Your IP : 216.73.216.196
B
�ˀX � @ s G d d� de �ZdS )c @ s, e Zd ZdZdZdd� Zdd� Zdd� ZdS ) �BaseMatchera�
Base class that ensures sub-classes that implement custom matchers can be
registered and have the only method that is required.
Usage:
.. code-block:: python
from betamax import Betamax, BaseMatcher
class MyMatcher(BaseMatcher):
name = 'my'
def match(self, request, recorded_request):
# My fancy matching algorithm
Betamax.register_request_matcher(MyMatcher)
The last line is absolutely necessary.
The `match` method will be given a `requests.PreparedRequest` object and a
dictionary. The dictionary always has the following keys:
- url
- method
- body
- headers
Nc C s | j std��| �� d S )NzMatchers require names)�name�
ValueError�on_init)�self� r �F/opt/alt/python37/lib/python3.7/site-packages/betamax/matchers/base.py�__init__&