Thank you, this makes sense. I made the mistake of storing environment
variables in my ini, which I then call in my views. I'll do some
refactoring and then be rid of this problem. This was helpful.

On Fri, Aug 7, 2015 at 11:08 AM, Francois Labelle <[email protected]>
wrote:

> What I do is that I use the pyramid.testing helper fonctions (see
> http://docs.pylonsproject.org/projects/pyramid//en/latest/api/testing.html)
> to allow me to test individual views. You don't use your ini file at all.
> You only configure the parts you need for the view under test.
>
> One error that could be happening is that nose, for some reason, has
> decided to fetch the file containing your app and load it, which in turn
> loads your ini file. Having "if __name__ == '__main__':" guards in your
> executable .py files usually takes care of that.
>
> On Monday, August 3, 2015 at 1:01:10 PM UTC-4, Brian Looker wrote:
>>
>> I am attempting to write tests for a Pyramid app which I'm running with
>> Nose, but I cannot figure out how to set them up. When adapting any code I
>> find in online examples, I receive an error in my testing where my app
>> pulls from my request.registry.settings (which should be my development.ini
>> file). How do I configure testing to use this ini file?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Brian Looker
IT - Information Services
UW Oshkosh
920-424-0487

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to