On May 30, 5:40 pm, Wyatt Baldwin <[email protected]> wrote:
> On May 30, 2:31 pm, Eugueny Kontsevoy <[email protected]> wrote:
>
> > They work, but we needed to have our existing 0.9.7 Pylons applications to
> > work and they don't access config objects via TestResponse. In fact 90% of
> > our tests are units, i.e. they don't issue request/response, they just do
> > "from pylons import config" and test business logic in isolation from
> > request/response machinery.
>
> Going a little off-topic here, but in my view, business logic
> generally shouldn't rely on Web app configuration.

That's both unhelpful to the discussion and nonsensical.  In practice
"business logic" can easily depend on configurable parameters.  E.g.
I'd like a test to ensure my account gets locked out after X failed
login attempts.  X is configurable.

I've griped about this before, but I think the biggest (only?) problem
that comes up repeatedly for us w/ Pylons is the inaccessibility of
these "special" globals from tests (without using response/request
objects).  Stacked object proxies.  I dream of a day (or a fork) when
these are either a thing of the past, or disabled by default.  (Mike
has given me some pointers in the past, but I still maintain that
writing tests shouldn't be so hard. -- and one shouldn't be forced to
use the WebTest framework, which IMO is inadequate for services
applications.)

Hans

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to