Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ticket #17448 -- Added test for raw SQL query

Added a test to the GeoDjango test suite.
The test performs a raw SQL query.
  • Loading branch information...
commit 2a707c47c6219d03a4dbedb033fe4a20539a3e6c 1 parent ac1b9ae
David Eklund davideklund authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 django/contrib/gis/tests/geoapp/
7 django/contrib/gis/tests/geoapp/
@@ -736,6 +736,13 @@ def test30_geohash(self):
self.assertEqual(ref_hash, h1.geohash)
self.assertEqual(ref_hash[:5], h2.geohash)
+ def test31_raw_sql_query(self):
+ "Testing raw SQL query."
+ cities1 = City.objects.all()
+ cities2 = City.objects.raw('select * from geoapp_city')
+ if len(cities1) > 0:
+ self.assertEqual(cities1[0], cities2[0])
from .test_feeds import GeoFeedTest
from .test_regress import GeoRegressionTests
from .test_sitemaps import GeoSitemapTest
Please sign in to comment.
Something went wrong with that request. Please try again.