[ckan-dev] test issue to avoid

Toby Dacre toby.okfn at gmail.com
Thu Nov 29 18:01:09 UTC 2012


On 29 November 2012 17:40, Adrià Mercader <adria.mercader at okfn.org> wrote:

> Hey Toby,
> Can you point to the offending setup_class() to have a better example
> for possible solutions.
>
>
The assert causing the problem is here and the function is called in
setup_class() the auth changes in the orgs branch caused the api call to
not be permitted.

https://github.com/okfn/ckan/blob/1635-feature-email-notifications-for-activity-streams/ckan/tests/functional/api/test_dashboard.py#L27


> Cheers,
>
> Adrià
>
> On 29 November 2012 16:47, Toby Dacre <toby.okfn at gmail.com> wrote:
> > Hi,
> >
> > I've just spent too long trying to resolve a load of broken tests.
> >
> > The problem came down to an assert failing within setup_class().  This
> > effectively stopped teardown_class() getting run and consequently
> causing a
> > dirty database to exist that then cause a domino effect of fails in tests
> > running after.  Just for fun these tests all run fine if run
> independently.
> >
> > So
> > a) this is just a warning/reminder to avoid/be aware of this issue
> > b) How is this best dealt with?  We do want to know something went wrong
> and
> > where but not cause later tests to fail too.  Any ideas?
> >
> > Cheers
> > Toby
> >
> > _______________________________________________
> > ckan-dev mailing list
> > ckan-dev at lists.okfn.org
> > http://lists.okfn.org/mailman/listinfo/ckan-dev
> > Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
> >
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20121129/643d6402/attachment-0001.html>


More information about the ckan-dev mailing list