adding settings during config.scan in decorator/venusian......

14 views
Skip to first unread message

Thomas G. Willis

unread,
May 13, 2013, 8:34:43 AM5/13/13
to pylons-...@googlegroups.com
So I have this code which works fine in unittesting but I get a KeyError https://gist.github.com/twillis/2c7722fb9f7fb0c22976#file-gistfile1-py-L70 when running. I even tried adding a dictionary to settings but by the time the request is handed to a resource or view the settings are not there. I'm sure I'm missing something but I can't figure it out. 


Anyone have any ideas?

Michael Merickel

unread,
May 13, 2013, 10:48:52 AM5/13/13
to Pylons
A traceback sure would be nice. Without one I'm going to throw out an initial guess that you are using a DummyRequest that isn't really attached to the registry at all. As it stands I have no idea what part of your paste is failing except that one line is highlighted. You showed 2 tests, one of which uses code that isn't included (self.make_request) and simply too much to sift through for you right now. ;-)


On Mon, May 13, 2013 at 7:34 AM, Thomas G. Willis <tom.w...@gmail.com> wrote:
So I have this code which works fine in unittesting but I get a KeyError https://gist.github.com/twillis/2c7722fb9f7fb0c22976#file-gistfile1-py-L70 when running. I even tried adding a dictionary to settings but by the time the request is handed to a resource or view the settings are not there. I'm sure I'm missing something but I can't figure it out. 


Anyone have any ideas?

--
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 pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas G. Willis

unread,
May 13, 2013, 11:46:26 AM5/13/13
to pylons-...@googlegroups.com
Yeah, sorry I realized after I sent the email out, that I should probably get a better gist up there. And as it turns out. it must be something in my unit test suite that's bugging it out.

So all of this actually works. 


sorry for the noise. 
Reply all
Reply to author
Forward
0 new messages