Skip to content

Commit

Permalink
Asserts to check if plugin is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelb committed Jun 9, 2014
1 parent dd5b86b commit 5ebca7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/new_tests/controllers/test_package.py
Expand Up @@ -6,9 +6,8 @@
import ckan.new_tests.factories as factories
import ckan.new_tests.helpers as helpers
import ckan.lib.search as search
import logging
import ckan.plugins as plugin

log = logging.getLogger('ckan')

class TestResourceRead(controllers.WsgiAppCase):

Expand All @@ -29,7 +28,8 @@ def test_existing_resource_with_associated_package(self):
new_package = factories.Dataset()
resource = factories.Resource(package_id=new_package['id'],
format='csv')
log.critical(config.get('ckan.plugins'))
assert not(plugin_loaded('text_preview')), 'Plugin loaded is true'
assert plugin_loaded('text_preview'), 'Plugin loaded is false'
response = self.app.get(
url=url_for(controller='package', action='resource_read',
id=new_package['id'], resource_id=resource['id']),
Expand Down

0 comments on commit 5ebca7b

Please sign in to comment.