Skip to content

Commit

Permalink
Fixed the pep8 warnings of lettuce terrain
Browse files Browse the repository at this point in the history
  • Loading branch information
fatiherikli committed Apr 29, 2013
1 parent 0b7a5f1 commit 76665e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion web/dbpatterns/__init__.py
@@ -1 +0,0 @@
__author__='fatiherikli'
10 changes: 7 additions & 3 deletions web/dbpatterns/terrain.py
@@ -1,5 +1,6 @@
import logging
import os, sys
import os
import sys

from django.conf import settings
from django.core.management import call_command
Expand All @@ -21,6 +22,7 @@ def switch_to_test_database():

try:
from south.management.commands import patch_for_test_db_setup

patch_for_test_db_setup()
except ImportError:
pass
Expand All @@ -31,15 +33,15 @@ def switch_to_test_database():
call_command('syncdb', **{
'settings': settings.SETTINGS_MODULE,
'interactive': False,
'verbosity': 0
})
'verbosity': 0})

# Reload mongodb database
settings.MONGODB_DATABASE = settings.MONGODB_TEST_DATABASE
for model in [Document, Entry, Notification]:
model.objects.load()
model.objects.collection.remove()


@after.all
def after_all(total):
logging.info("Destroy test database ...\n")
Expand All @@ -59,8 +61,10 @@ def before_each_feature(scenario):
'settings': settings.SETTINGS_MODULE,
'interactive': False})


def setup_test_directory():
sys.path.append(os.path.join(os.path.dirname(__file__), "../../tests"))
__import__("steps")


setup_test_directory()

0 comments on commit 76665e3

Please sign in to comment.