def match(self, target, url, matcher_method='GET', request_method='GET', complete_qs=False, headers=None, request_data=None, request_headers={}, additional_matcher=None, real_http=False, case_sensitive=False): matcher = adapter._Matcher(matcher_method, target, [], complete_qs=complete_qs, additional_matcher=additional_matcher, request_headers=request_headers, real_http=real_http, case_sensitive=case_sensitive) request = adapter._RequestObjectProxy._create(request_method, url, headers, data=request_data) return matcher._match(request)
def match( self, target, url, matcher_method="GET", request_method="GET", complete_qs=False, headers=None, request_headers={}, ): matcher = adapter._Matcher(matcher_method, target, [], complete_qs, request_headers) request = adapter._RequestObjectProxy._create(request_method, url, headers) return matcher._match(request)
def match(self, target, url, matcher_method='GET', request_method='GET', complete_qs=False, headers=None, request_headers={}): matcher = adapter._Matcher(matcher_method, target, [], complete_qs, request_headers) request = adapter._RequestObjectProxy._create(request_method, url, headers) return matcher._match(request)
def test_reset_reverts_count(self): url = 'mock://test/site/' matcher = adapter._Matcher('GET', url, [_MatcherResponse()], complete_qs=False, additional_matcher=None, request_headers={}, real_http=False, case_sensitive=False) request = adapter._RequestObjectProxy._create('GET', url) call_count = 3 for _ in range(call_count): matcher(request) self.assertEqual(matcher.call_count, call_count) matcher.reset() self.assertEqual(matcher.call_count, 0)
def match(self, target, url, matcher_method='GET', request_method='GET', complete_qs=False, headers=None, request_headers={}, real_http=False, case_sensitive=False): matcher = adapter._Matcher(matcher_method, target, [], complete_qs, request_headers, real_http=real_http, case_sensitive=case_sensitive) request = adapter._RequestObjectProxy._create(request_method, url, headers) return matcher._match(request)