I see that we use this pattern of importing what the tests need in the test itself everywhere in this file, but I haven't seen it used in other places. Do you know if it's something we should start doing? If not, I would prefer to move those imports to the beginning of the file, following the [relative coding standards](http://docs.ckan.org/en/latest/contributing/python.html#imports)