mirror of https://github.com/django/django.git
Fixed #29813 -- Fixed DatabaseOperation test when run in isolation on MySQL.
This commit is contained in:
parent
7206601040
commit
7598cd4748
|
@ -3,11 +3,13 @@ import decimal
|
||||||
from django.db import NotSupportedError, connection
|
from django.db import NotSupportedError, connection
|
||||||
from django.db.backends.base.operations import BaseDatabaseOperations
|
from django.db.backends.base.operations import BaseDatabaseOperations
|
||||||
from django.db.models import DurationField
|
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
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class DatabaseOperationTests(SimpleTestCase):
|
class SimpleDatabaseOperationTests(SimpleTestCase):
|
||||||
may_requre_msg = 'subclasses of BaseDatabaseOperations may require a %s() method'
|
may_requre_msg = 'subclasses of BaseDatabaseOperations may require a %s() method'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
@ -132,6 +134,10 @@ class DatabaseOperationTests(SimpleTestCase):
|
||||||
with self.assertRaisesMessage(NotSupportedError, msg):
|
with self.assertRaisesMessage(NotSupportedError, msg):
|
||||||
self.ops.subtract_temporals(duration_field_internal_type, None, None)
|
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')
|
@skipIfDBFeature('supports_over_clause')
|
||||||
def test_window_frame_raise_not_supported_error(self):
|
def test_window_frame_raise_not_supported_error(self):
|
||||||
msg = 'This backend does not support window expressions.'
|
msg = 'This backend does not support window expressions.'
|
||||||
|
|
Loading…
Reference in New Issue