On Thu, 3 Dec 2020 23:41:04 -0600
Michael Merickel <mmeri...@gmail.com> wrote:

> The request.registry = ... is fine and supported. The alternative is
> that you can just do everything with the threadlocal pushed and then
> DummyRequest will pick up the registry automatically.
> 
> with config:
>     request = DummyRequest()
>     path = request.route_path(route_name)
> 
> Or manually with config.begin(); ...; config.end().

I see.  Understood.  Thanks.

I was so proud of my pytest fixture:

@fixture
def pyramid_request_config():
    request = DummyRequest()
    yield setUp(request=request)
    tearDown()

But it's no good in this case given that the code I'm testing
needs to produce it's own config.  :-/

Regards,

Karl <k...@karlpinc.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-devel/20201203235021.401ec1eb%40slate.karlpinc.com.

Reply via email to