Skip to content

Commit

Permalink
[#1117] Skip ckan_nose_plugin's db stuff for new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Aug 1, 2013
1 parent cbd8d89 commit 6195c29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/ckan_nose_plugin.py
Expand Up @@ -17,6 +17,10 @@ def startContext(self, ctx):
# import needs to be here or setup happens too early
import ckan.model as model

if 'new_tests' in repr(ctx):
# We don't want to do the stuff below for new-style tests.
return

if isclass(ctx):
if hasattr(ctx, "no_db") and ctx.no_db:
return
Expand All @@ -38,7 +42,7 @@ def startContext(self, ctx):
from ckan.plugins.interfaces import IConfigurable
for plugin in PluginImplementations(IConfigurable):
plugin.configure(config)

model.repo.init_db()

def options(self, parser, env):
Expand Down

0 comments on commit 6195c29

Please sign in to comment.