def test_outbox_routes(route, handler): matching = [ handler for r, handler in routes.outbox.routes if activity.match_route(r, route) ] assert len(matching) == 1, "Outbox route {} not found".format(route) assert matching[0] == handler
def test_route_matching(route, payload, expected): assert activity.match_route(route, payload) is expected
def test_match_route_ignore_payload_issues(): payload = {"object": "http://hello"} assert activity.match_route({"object.type": "Test"}, payload) is False