summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-10-02 07:22:38 -0500
committerTim Graham <timograham@gmail.com>2018-10-02 08:22:38 -0400
commit7598cd4748dc402b0209e5eedb6d2a83c3da1620 (patch)
tree71ca6c0f41d702d76b95e30e1fcdad65e2e465d2
parent7206601040304c762f5014048fda6fa68ec1ee84 (diff)
Fixed #29813 -- Fixed DatabaseOperation test when run in isolation on MySQL.
-rw-r--r--tests/backends/base/test_operations.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/backends/base/test_operations.py b/tests/backends/base/test_operations.py
index 510436f0d4..7ca0535135 100644
--- a/tests/backends/base/test_operations.py
+++ b/tests/backends/base/test_operations.py
@@ -3,11 +3,13 @@ import decimal
from django.db import NotSupportedError, connection
from django.db.backends.base.operations import BaseDatabaseOperations
from django.db.models import DurationField
-from django.test import SimpleTestCase, override_settings, skipIfDBFeature
+from django.test import (
+ SimpleTestCase, TestCase, override_settings, skipIfDBFeature,
+)
from django.utils import timezone
-class DatabaseOperationTests(SimpleTestCase):
+class SimpleDatabaseOperationTests(SimpleTestCase):
may_requre_msg = 'subclasses of BaseDatabaseOperations may require a %s() method'
def setUp(self):
@@ -132,6 +134,10 @@ class DatabaseOperationTests(SimpleTestCase):
with self.assertRaisesMessage(NotSupportedError, msg):
self.ops.subtract_temporals(duration_field_internal_type, None, None)
+
+class DatabaseOperationTests(TestCase):
+ # Checking the 'supports_over_clause' feature requires a query for the
+ # MySQL backend to perform a version check.
@skipIfDBFeature('supports_over_clause')
def test_window_frame_raise_not_supported_error(self):
msg = 'This backend does not support window expressions.'