diff --git a/django/contrib/gis/tests/relatedapp/models.py b/django/contrib/gis/tests/relatedapp/models.py
index 3b4364f..5221bbe 100644
a
|
b
|
class Article(SimpleModel):
|
71 | 71 | class Book(SimpleModel): |
72 | 72 | title = models.CharField(max_length=100) |
73 | 73 | author = models.ForeignKey(Author, related_name='books', null=True) |
| 74 | |
| 75 | |
| 76 | class Event(SimpleModel): |
| 77 | name = models.CharField(max_length=100) |
| 78 | when = models.DateTimeField() |
diff --git a/django/contrib/gis/tests/relatedapp/tests.py b/django/contrib/gis/tests/relatedapp/tests.py
index b478005..00664e0 100644
a
|
b
|
from unittest import skipUnless
|
5 | 5 | from django.contrib.gis.geos import HAS_GEOS |
6 | 6 | from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite |
7 | 7 | from django.test import TestCase |
| 8 | from django.test.utils import override_settings |
| 9 | from django.utils import timezone |
8 | 10 | |
9 | 11 | if HAS_GEOS: |
10 | 12 | from django.contrib.gis.db.models import Collect, Count, Extent, F, Union |
11 | 13 | from django.contrib.gis.geometry.backend import Geometry |
12 | 14 | from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint |
13 | 15 | |
14 | | from .models import City, Location, DirectoryEntry, Parcel, Book, Author, Article |
| 16 | from .models import City, Location, DirectoryEntry, Parcel, Book, Author, Article, Event |
15 | 17 | |
16 | 18 | |
17 | 19 | @skipUnless(HAS_GEOS and HAS_SPATIAL_DB, "Geos and spatial db are required.") |
… |
… |
class RelatedGeoModelTest(TestCase):
|
187 | 189 | self.assertEqual(m.point, d['point']) |
188 | 190 | self.assertEqual(m.point, t[1]) |
189 | 191 | |
| 192 | @override_settings(USE_TZ=True) |
| 193 | def test07b_values(self): |
| 194 | "Testing values() and values_list() with aware datetime. See #21565." |
| 195 | Event.objects.create(name="foo", when=timezone.now()) |
| 196 | print Event.objects |
| 197 | list(Event.objects.values_list('when')) |
| 198 | |
190 | 199 | def test08_defer_only(self): |
191 | 200 | "Testing defer() and only() on Geographic models." |
192 | 201 | qs = Location.objects.all() |