Skipped UUID pk test if less than Django 1.7

master
Brandon Taylor 2016-10-12 21:50:42 -04:00
parent 32726cdcae
commit fcf2829633
1 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,7 @@ except ImportError:
import json
import uuid
from django import VERSION
from django.contrib.auth.models import User
from django.db import models
from django.test import TestCase
@ -335,6 +336,8 @@ class SortableTestCase(TestCase):
self.assertEqual(notes, expected_notes)
def test_save_non_auto_field_model(self):
if VERSION > (1, 7):
model = TestNonAutoFieldModel()
model.save()
else:
pass