Beispiel #1
0
def test_tween(config, handler):
    tween = pyramid_prometheus.tween_factory(handler, config.registry)
    req = testing.DummyRequest()
    req.matched_route = None
    got_resp = tween(req)
    #from prometheus_client import REGISTRY
    #for metric in REGISTRY.collect():
    #    assert metric.samples == 0
    assert got_resp == req.response
Beispiel #2
0
 def f():
     return pyramid_prometheus.tween_factory(handler, config.registry)