summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Martin <rdm@google.com>2013-05-22 16:25:57 -0400
committerRobert Martin <rdm@google.com>2013-05-22 18:08:56 -0400
commitc1321462d7381b00e79f39c6805d95dc40128f42 (patch)
tree2115a6e70dad89b973086880c4094a21a72da030
parent806df3c2b0a71a85b6777e7f13e01dc115d9bef6 (diff)
downloadaskbot-c1321462d7381b00e79f39c6805d95dc40128f42.tar.gz
askbot-c1321462d7381b00e79f39c6805d95dc40128f42.tar.bz2
askbot-c1321462d7381b00e79f39c6805d95dc40128f42.zip
prevent south migrate during tests
Many tests would fail when run in MySQL because the test database was not being set up correctly. With this setting, the MySQL database constructs itself correctly.
-rw-r--r--askbot/setup_templates/settings.py6
-rw-r--r--askbot/setup_templates/settings.py.mustache14
2 files changed, 14 insertions, 6 deletions
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py
index 258a5989..1427e506 100644
--- a/askbot/setup_templates/settings.py
+++ b/askbot/setup_templates/settings.py
@@ -307,5 +307,9 @@ if 'ASKBOT_CSS_DEVEL' in locals() and ASKBOT_CSS_DEVEL == True:
)
COMPRESS_JS_FILTERS = []
-COMPRESS_PARSER = 'compressor.parser.HtmlParser'
+COMPRESS_PARSER = 'compressor.parser.HtmlParser'
JINJA2_EXTENSIONS = ('compressor.contrib.jinja2ext.CompressorExtension',)
+
+# Use syncdb for tests instead of South migrations. Without this, some tests
+# fail spuriously in MySQL.
+SOUTH_TESTS_MIGRATE = False
diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache
index f3c0a35b..c14ebaee 100644
--- a/askbot/setup_templates/settings.py.mustache
+++ b/askbot/setup_templates/settings.py.mustache
@@ -46,7 +46,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
#go to the site's live settings and enable the feature
#"Email settings" -> "allow asking by email"
#
-# WARNING: command post_emailed_questions DELETES all
+# WARNING: command post_emailed_questions DELETES all
# emails from the mailbox each time
# do not use your personal mail box here!!!
#
@@ -125,7 +125,7 @@ ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls'
#UPLOAD SETTINGS
FILE_UPLOAD_TEMP_DIR = os.path.join(
- os.path.dirname(__file__),
+ os.path.dirname(__file__),
'tmp'
).replace('\\','/')
@@ -258,7 +258,7 @@ HAYSTACK_SITECONF = 'askbot.search.haystack'
#http://django-haystack.readthedocs.org/en/v1.2.7/settings.html
HAYSTACK_SEARCH_ENGINE = 'simple'
-TINYMCE_COMPRESSOR = True
+TINYMCE_COMPRESSOR = True
TINYMCE_SPELLCHECKER = False
TINYMCE_JS_ROOT = os.path.join(STATIC_ROOT, 'default/media/js/tinymce/')
#TINYMCE_JS_URL = STATIC_URL + 'default/media/js/tinymce/tiny_mce.js'
@@ -287,7 +287,7 @@ TINYMCE_DEFAULT_CONFIG = {
}
#delayed notifications, time in seconds, 15 mins by default
-NOTIFICATION_DELAY_TIME = 60 * 15
+NOTIFICATION_DELAY_TIME = 60 * 15
GROUP_MESSAGING = {
'BASE_URL_GETTER_FUNCTION': 'askbot.models.user_get_profile_url',
@@ -303,5 +303,9 @@ if 'ASKBOT_CSS_DEVEL' in locals() and ASKBOT_CSS_DEVEL == True:
)
COMPRESS_JS_FILTERS = []
-COMPRESS_PARSER = 'compressor.parser.HtmlParser'
+COMPRESS_PARSER = 'compressor.parser.HtmlParser'
JINJA2_EXTENSIONS = ('compressor.contrib.jinja2ext.CompressorExtension',)
+
+# Use syncdb for tests instead of South migrations. Without this, some tests
+# fail spuriously in MySQL.
+SOUTH_TESTS_MIGRATE = False