~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/contrib/gis/tests/relatedapp/tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.1.12 upstream) (29.1.1 maverick-security)
  • Revision ID: james.westby@ubuntu.com-20101012113435-yy57c8tx6g9anf3e
Tags: 1.2.3-1ubuntu0.1
* SECURITY UPDATE: XSS in CSRF protections. New upstream release
  - CVE-2010-3082
* debian/patches/01_disable_url_verify_regression_tests.diff:
  - updated to disable another test that fails without internet connection
  - patch based on work by Kai Kasurinen and Krzysztof Klimonda
* debian/control: don't Build-Depends on locales-all, which doesn't exist
  in maverick

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
from django.contrib.gis.geometry.backend import Geometry
5
5
from django.contrib.gis.tests.utils import mysql, oracle, postgis, spatialite, no_mysql, no_oracle, no_spatialite
6
6
from django.conf import settings
7
 
from models import City, Location, DirectoryEntry, Parcel, Book, Author
 
7
from models import City, Location, DirectoryEntry, Parcel, Book, Author, Article
8
8
 
9
9
cities = (('Aurora', 'TX', -97.516111, 33.058333),
10
10
          ('Roswell', 'NM', -104.528056, 33.387222),
291
291
            self.assertEqual(4, len(coll))
292
292
            self.assertEqual(ref_geom, coll)
293
293
 
 
294
    def test15_invalid_select_related(self):
 
295
        "Testing doing select_related on the related name manager of a unique FK. See #13934."
 
296
        qs = Article.objects.select_related('author__article')
 
297
        # This triggers TypeError when `get_default_columns` has no `local_only`
 
298
        # keyword.  The TypeError is swallowed if QuerySet is actually
 
299
        # evaluated as list generation swallows TypeError in CPython.
 
300
        sql = str(qs.query)
 
301
        
294
302
    # TODO: Related tests for KML, GML, and distance lookups.
295
303
 
296
304
def suite():