Run uuid field tests unconditional
parent
209a280ce8
commit
9997644929
|
|
@ -3,12 +3,8 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import http.client as httplib
|
import http.client as httplib
|
||||||
|
|
||||||
from django import VERSION
|
|
||||||
|
|
||||||
if VERSION > (1, 8):
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import uuid
|
||||||
|
|
||||||
from django import VERSION
|
from django import VERSION
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
|
@ -33,13 +29,12 @@ class TestSortableModel(SortableMixin):
|
||||||
return self.title
|
return self.title
|
||||||
|
|
||||||
|
|
||||||
if VERSION > (1, 8):
|
class TestNonAutoFieldModel(SortableMixin):
|
||||||
class TestNonAutoFieldModel(SortableMixin):
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
order = models.PositiveIntegerField(editable=False, db_index=True)
|
||||||
order = models.PositiveIntegerField(editable=False, db_index=True)
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
ordering = ['order']
|
ordering = ['order']
|
||||||
|
|
||||||
|
|
||||||
class SortableTestCase(TestCase):
|
class SortableTestCase(TestCase):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue