Permalink
Browse files

Remade test project with newer django project template.

  • Loading branch information...
melinath committed Mar 5, 2013
1 parent 277d704 commit 8063f8e1da6692efa3338ac8d82adb9a2c68d093
View
@@ -3,8 +3,8 @@
/mirocommunity.egg-info/*
/docs/_build/*
/.tox/
/test_mc_project/media/
/test_mc_project/test_mc_project.sl3
/test_mc_project/whoosh_index/
/test_mc_project/nosetests*.xml
/test_mc_project/webdriver_results/
/test_project/test_project/media/
/test_project/test_project/db.sl3
/test_project/test_project/whoosh_index/
/test_project/test_project/nosetests*.xml
/test_project/test_project/webdriver_results/
View
@@ -19,6 +19,6 @@ install:
before_script:
- if [ $DB == 'mysql' ]; then mysql -e 'CREATE DATABASE mirocommunity_test;'; fi
script:
- cd test_mc_project
- cd test_project
- MC_DIR=`python -c "import localtv, os; print(os.path.dirname(localtv.__file__))"`
- ./manage.py test --verbosity=2 localtv.tests localtv.contrib --exclude-dir=$MC_DIR/tests/selenium
View
@@ -1,14 +0,0 @@
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
sys.exit(1)
import settings
if __name__ == "__main__":
execute_manager(settings)
View
@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
@@ -1,4 +1,5 @@
git+http://git.participatoryculture.org/django-email-share/@master#egg=django_email_share
git+http://git.participatoryculture.org/djpagetabs@0d5ec5a1a318830380728e04d2160bc35db8469a#egg=djpagetabs
git+git://github.com/pculture/django-uploadtemplate.git@233bdf6dce5108e9ed3d6efec6593148d62e5b0c#egg=django-uploadtemplate
git+git://github.com/pculture/djvideo.git@ddc27014800a3432abc82872d8bacf103ab91c2f#egg=djvideo
git+git://github.com/pythonforfacebook/facebook-sdk.git@master#egg=facebook_python_sdk
File renamed without changes.
@@ -2,6 +2,8 @@
import os
_PROJECT_DIR = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -33,7 +35,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(os.path.dirname(__file__), 'test_mc_project.sl3'),
'NAME': os.path.join(_PROJECT_DIR, 'db.sl3'),
}
}
@@ -51,7 +53,7 @@
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'),
'PATH': os.path.join(_PROJECT_DIR, 'whoosh_index'),
}
}
@@ -77,15 +79,15 @@
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
USE_I18N = False
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = 'media/'
MEDIA_ROOT = os.path.join(_PROJECT_DIR, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
@@ -96,7 +98,7 @@
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = 'static/'
STATIC_ROOT = os.path.join(_PROJECT_DIR, 'static')
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
@@ -119,7 +121,7 @@
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'test_mc_project_secret_key'
SECRET_KEY = 'not_secret_key'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
@@ -142,7 +144,7 @@
'localtv.middleware.UserIsAdminMiddleware',
)
ROOT_URLCONF = 'test_mc_project.urls'
ROOT_URLCONF = 'test_project.urls'
UPLOADTEMPLATE_MEDIA_ROOT = MEDIA_ROOT + 'uploadtemplate/'
UPLOADTEMPLATE_MEDIA_URL = MEDIA_URL + 'uploadtemplate/'
@@ -197,7 +199,7 @@
# Webdriver test settings
TEST_BROWSER = 'Firefox'
TEST_RESULTS_DIR = os.path.join(os.path.dirname(__file__), 'webdriver_results')
TEST_RESULTS_DIR = os.path.join(_PROJECT_DIR, 'webdriver_results')
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.debug',
File renamed without changes.
@@ -0,0 +1,28 @@
"""
WSGI config for test_project project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setting.
Usually you will have the standard Django WSGI application here, but it also
might make sense to replace the whole Django WSGI application with a custom one
that later delegates to the Django one. For example, you could introduce WSGI
middleware here, or combine a Django application with an application of another
framework.
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings")
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)
View
@@ -2,7 +2,7 @@
envlist = py26, py27
[testenv]
changedir = {toxinidir}/test_mc_project
changedir = {toxinidir}/test_project
commands =
pip install selenium
pip install --no-deps --use-mirrors -r requirements.txt

0 comments on commit 8063f8e

Please sign in to comment.