diff options
author | Vajrasky Kok <sky.kok@speaklikeaking.com> | 2013-11-24 21:12:22 +0800 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2014-02-06 05:16:40 -0500 |
commit | d3cf6cfacfb828faad4f4f97c904e259304649b3 (patch) | |
tree | ae44bc63cc45a144edbec26bb5590b8225e70233 /tests/bulk_create | |
parent | b22d6c47a7e4c7ab26a8b7b033d11fa6743aae86 (diff) | |
download | django-d3cf6cfacfb828faad4f4f97c904e259304649b3.tar.gz |
Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to allows_auto_pk_0.
MySQL does allow primary key with value 0. It only forbids autoincrement
primary key with value 0.
Thanks Claude Paroz for the report.
Diffstat (limited to 'tests/bulk_create')
-rw-r--r-- | tests/bulk_create/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py index 367cbde04d..8648184223 100644 --- a/tests/bulk_create/tests.py +++ b/tests/bulk_create/tests.py @@ -70,13 +70,12 @@ class BulkCreateTests(TestCase): "CA", "IL", "ME", "NY", ], attrgetter("two_letter_code")) - @skipIfDBFeature('allows_primary_key_0') + @skipIfDBFeature('allows_auto_pk_0') def test_zero_as_autoval(self): """ Zero as id for AutoField should raise exception in MySQL, because MySQL does not allow zero for automatic primary key. """ - valid_country = Country(name='Germany', iso_two_letter='DE') invalid_country = Country(id=0, name='Poland', iso_two_letter='PL') with self.assertRaises(ValueError): |