Skip to content

Commit

Permalink
Merge b3ef87f into 7f9843b
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Apr 17, 2015
2 parents 7f9843b + b3ef87f commit f54677d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Expand Up @@ -2,13 +2,14 @@ language: python

python:
- 2.7
- 3.3
- 3.4

env:
- DJANGO_VERSION=1.4.10
- DJANGO_VERSION=1.5.5
- DJANGO_VERSION=1.6.1
- DJANGO_VERSION=1.5.12
- DJANGO_VERSION=1.6.11
- DJANGO_VERSION=1.7.7
- DJANGO_VERSION=1.8

before_install:
- sudo apt-get update > /dev/null
Expand Down
6 changes: 5 additions & 1 deletion djgeojson/tests.py
Expand Up @@ -593,7 +593,11 @@ def setUp(self):

def test_models_can_have_geojson_fields(self):
saved = Address.objects.get(id=self.address.id)
self.assertDictEqual(saved.geom, self.address.geom)
if isinstance(saved.geom, dict):
self.assertDictEqual(saved.geom, self.address.geom)
else:
# Django 1.8 !
self.assertEqual(json.loads(saved.geom.geojson), self.address.geom)

def test_default_form_field_is_geojsonfield(self):
field = self.address._meta.get_field('geom').formfield()
Expand Down
4 changes: 3 additions & 1 deletion quicktest.py
@@ -1,8 +1,9 @@
import os
import sys
import argparse
from django.conf import settings

import django
from django.conf import settings


class QuickDjangoTest(object):
Expand Down Expand Up @@ -45,6 +46,7 @@ def run_tests(self):
},
INSTALLED_APPS=self.INSTALLED_APPS + self.apps,
)

if django.VERSION >= (1, 7, 0):
# see: https://docs.djangoproject.com/en/dev/releases/1.7/#standalone-scripts
django.setup()
Expand Down

0 comments on commit f54677d

Please sign in to comment.