def test_uri_matcher(): for k1, k2 in itertools.permutations(REQUESTS, 2): expecting_assertion_error = {k1, k2} != {"base", "method"} if expecting_assertion_error: with pytest.raises(AssertionError): matchers.uri(REQUESTS[k1], REQUESTS[k2]) else: assert matchers.uri(REQUESTS[k1], REQUESTS[k2]) is None
def test_uri_matcher(): for k1, k2 in itertools.permutations(REQUESTS, 2): matched = matchers.uri(REQUESTS[k1], REQUESTS[k2]) if set((k1, k2)) != set(('base', 'method')): assert not matched else: assert matched
def test_uri_matcher(): for k1, k2 in itertools.permutations(REQUESTS, 2): matched = matchers.uri(REQUESTS[k1], REQUESTS[k2]) if {k1, k2} != {'base', 'method'}: assert not matched else: assert matched