Re: [pylons-discuss] Testing advise

2020-12-06 Thread Steve Piercy
Hi Lele, Your project would be a nice addition to Powered by Pyramid: https://trypyramid.com/community-powered-by-pyramid.html Please consider submitting a pull request to add it. Thank you! --steve On 12/6/20 2:41 AM, Lele Gaifax wrote: > Hi all, > > I'm used to have something like the

Re: [pylons-discuss] Testing advise

2020-12-06 Thread Michael Merickel
The "recommended" approach for doing this would be to create a DummyRequest and then use its route_url, etc methods. This will allow you to use Pyramid's actual url generation apis instead of re-implementing them yourself, as well as avoiding needing to use the private route mapper. req =

[pylons-discuss] Testing advise

2020-12-06 Thread Lele Gaifax
Hi all, I'm used to have something like the following in my tests setup: https://gitlab.com/metapensiero/SoL/-/blob/master/tests/server/conftest.py#L45 that allows me to use the route name in my tests instead of the view URL, like: