Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Skip `LayerMapRouterTest` if there are not multiple databases.

  • Loading branch information...
commit 1c010ce41d6790b94d396aabe5c585cf1cc04b70 1 parent c1b06c8
@jbronn jbronn authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/contrib/gis/tests/layermap/tests.py
View
3  django/contrib/gis/tests/layermap/tests.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import os
+import unittest
from copy import copy
from decimal import Decimal
@@ -9,6 +10,7 @@
from django.contrib.gis.utils.layermapping import (LayerMapping, LayerMapError,
InvalidDecimal, MissingForeignKey)
from django.db import router
+from django.conf import settings
from django.test import TestCase
from .models import (
@@ -308,6 +310,7 @@ def setUp(self):
def tearDown(self):
router.routers = self.old_routers
+ @unittest.skipUnless(len(settings.DATABASES) > 1, 'multiple databases required')
def test_layermapping_default_db(self):
lm = LayerMapping(City, city_shp, city_mapping)
self.assertEqual(lm.using, 'other')

0 comments on commit 1c010ce

Please sign in to comment.
Something went wrong with that request. Please try again.