[ckan-dev] Loading plugins in plugin tests

Sean Hammond sean.hammond at okfn.org
Wed Jan 23 20:17:50 UTC 2013


Hey, I think someone once explained to me what the problem was, but I
forgot.

Why is that in some extensions, when you run the extension's tests the
plugin is not loaded, even though it calls ckan.plugins.load()?
Examples:

https://github.com/okfn/ckan/pull/193/files#L2R6
https://github.com/okfn/ckan/pull/295/files#L11R0
https://github.com/okfn/ckan/pull/295/files#L6R0

But in other cases it does seem to work, e.g.:

https://github.com/okfn/ckan/blob/master/ckanext/datastore/tests/test_create.py#L14

Maybe I'm doing something stupid (seems likely).

This is blocking two or three pull requests now! And stopping me from
writing example plugins with tests.




More information about the ckan-dev mailing list