diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-05-12 12:00:03 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-05-12 12:03:46 +0300 |
| commit | de79d23ce04193e0bc140991533359002f62ddf9 (patch) | |
| tree | 36e554aa5591db208aa7fc03bc5a6394b47289b8 | |
| parent | 365853da016f242937a657b488514e2f69fa6d82 (diff) | |
Avoided test failure on MySQL by skipping a failing test
MySQL generates an extra query in inheritance cases when doing an update.
This results in a test failure when checking for number of queries in
update_only_fields tests. Added a skip temporarily to avoid this test
failure. Refs #18304.
| -rw-r--r-- | tests/modeltests/update_only_fields/tests.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/modeltests/update_only_fields/tests.py b/tests/modeltests/update_only_fields/tests.py index e843bd7ab9..8609821a44 100644 --- a/tests/modeltests/update_only_fields/tests.py +++ b/tests/modeltests/update_only_fields/tests.py @@ -1,6 +1,6 @@ from __future__ import absolute_import -from django.test import TestCase +from django.test import TestCase, skipUnlessDBFeature from django.db.models.signals import pre_save, post_save from .models import Person, Employee, ProxyEmployee, Profile, Account @@ -123,6 +123,9 @@ class UpdateOnlyFieldsTests(TestCase): self.assertEqual(len(pre_save_data), 0) self.assertEqual(len(post_save_data), 0) + # A bug in SQLUpdateCompiler prevents this test from succeeding on MySQL + # Require update_can_self_select for this test for now. Refs #18304. + @skipUnlessDBFeature('update_can_self_select') def test_num_queries_inheritance(self): s = Employee.objects.create(name='Sara', gender='F') s.employee_num = 1 |
