2017-07-07 20:54:08 +08:00
|
|
|
import copy
|
|
|
|
|
|
|
|
from django.contrib.gis.db.models.sql import AreaField, DistanceField
|
|
|
|
from django.test import SimpleTestCase
|
|
|
|
|
|
|
|
|
|
|
|
class FieldsTests(SimpleTestCase):
|
|
|
|
|
|
|
|
def test_area_field_deepcopy(self):
|
2017-09-11 23:56:39 +08:00
|
|
|
field = AreaField(None)
|
2017-07-07 20:54:08 +08:00
|
|
|
self.assertEqual(copy.deepcopy(field), field)
|
|
|
|
|
|
|
|
def test_distance_field_deepcopy(self):
|
2017-09-11 23:56:39 +08:00
|
|
|
field = DistanceField(None)
|
2017-07-07 20:54:08 +08:00
|
|
|
self.assertEqual(copy.deepcopy(field), field)
|