Permalink
Browse files

Molly on travis?

  • Loading branch information...
1 parent 7b3cf9b commit 1ce32ab931d520e162dc5f90a2ade34641a21b7a @davbo davbo committed May 31, 2012
Showing with 38 additions and 7 deletions.
  1. +17 −0 .travis.yml
  2. +0 −1 MANIFEST.in
  3. +14 −0 molly/conf/test_settings.py
  4. +6 −5 runtests.py
  5. +1 −1 setup.py
View
@@ -0,0 +1,17 @@
+language: python
+python:
+ - "2.6"
+ - "2.7"
+env:
+ - DJANGO=1.3.1
+before_install:
+ - sudo apt-get update
+ - sudo apt-get install binutils gdal-bin libproj-dev postgresql-9.1-postgis postgresql-server-dev-9.1 python-psycopg2
+ - sudo su - postgres -c "wget -qO- https://docs.djangoproject.com/en/dev/_downloads/create_template_postgis-debian.sh | sh"
+install:
+ - pip install -q Django==$DJANGO --use-mirrors
+ - pip install -q -e . --use-mirrors
+before_script:
+ - django-admin.py update_wurfl --settings=molly.conf.test_settings
+script:
+ - python setup.py test
View
@@ -11,4 +11,3 @@ recursive-include molly/templates *
recursive-include molly/maps/management/commands/markers *
recursive-include molly/maps/osm/fallback *
recursive-include molly/commands/site_template *
-exclude molly/wurfl/wurfl_data.py
@@ -0,0 +1,14 @@
+from molly.commands.site_template.settings import *
+from os import path
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.contrib.gis.db.backends.postgis',
+ 'NAME': 'molly',
+ 'USER': 'dave'
+ }
+}
+
+TEST_RUNNER = 'discover_runner.DiscoverRunner'
+TEST_DISCOVER_TOP_LEVEL = path.dirname(path.dirname(__file__))
+TEST_DISCOVER_ROOT = TEST_DISCOVER_TOP_LEVEL
View
@@ -2,17 +2,18 @@
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'molly.conf.test_settings'
-test_dir = os.path.dirname(__file__)
-sys.path.insert(0, test_dir)
from django.test.utils import get_runner
from django.conf import settings
def runtests():
- test_runner = get_runner(settings)()
- failures = test_runner.run_tests([], interactive=True, verbosity=1)
- sys.exit(failures)
+ from south.management.commands import patch_for_test_db_setup
+ patch_for_test_db_setup()
+ test_runner = get_runner(settings)
+ test_runner = test_runner(interactive=True, verbosity=1, failfast=False)
+ failures = test_runner.run_tests([])
+ sys.exit(bool(failures))
if __name__ == '__main__':
runtests()
View
@@ -76,7 +76,7 @@
"python-dateutil==1.5",
"Django==1.3.1",
"oauth==1.0.1",
- "psycopg2==2.4.5",
+ "psycopg2==2.4.1",
"PIL==1.1.7",
"lxml>=2.3.4,<2.4",
"python-ldap>=2.4.9,<2.5",

0 comments on commit 1ce32ab

Please sign in to comment.