Fixed typo in tests/backends/base/test_operations.py.
This commit is contained in:
parent
94b32a20ef
commit
537b0c5edf
|
@ -10,7 +10,7 @@ from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
class SimpleDatabaseOperationTests(SimpleTestCase):
|
class SimpleDatabaseOperationTests(SimpleTestCase):
|
||||||
may_requre_msg = 'subclasses of BaseDatabaseOperations may require a %s() method'
|
may_require_msg = 'subclasses of BaseDatabaseOperations may require a %s() method'
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.ops = BaseDatabaseOperations(connection=connection)
|
self.ops = BaseDatabaseOperations(connection=connection)
|
||||||
|
@ -22,15 +22,15 @@ class SimpleDatabaseOperationTests(SimpleTestCase):
|
||||||
self.assertEqual(self.ops.end_transaction_sql(success=False), 'ROLLBACK;')
|
self.assertEqual(self.ops.end_transaction_sql(success=False), 'ROLLBACK;')
|
||||||
|
|
||||||
def test_no_limit_value(self):
|
def test_no_limit_value(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'no_limit_value'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'no_limit_value'):
|
||||||
self.ops.no_limit_value()
|
self.ops.no_limit_value()
|
||||||
|
|
||||||
def test_quote_name(self):
|
def test_quote_name(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'quote_name'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'quote_name'):
|
||||||
self.ops.quote_name('a')
|
self.ops.quote_name('a')
|
||||||
|
|
||||||
def test_regex_lookup(self):
|
def test_regex_lookup(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'regex_lookup'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'regex_lookup'):
|
||||||
self.ops.regex_lookup(lookup_type='regex')
|
self.ops.regex_lookup(lookup_type='regex')
|
||||||
|
|
||||||
def test_set_time_zone_sql(self):
|
def test_set_time_zone_sql(self):
|
||||||
|
@ -82,39 +82,39 @@ class SimpleDatabaseOperationTests(SimpleTestCase):
|
||||||
self.assertEqual(self.ops.adapt_timefield_value(now), str(now))
|
self.assertEqual(self.ops.adapt_timefield_value(now), str(now))
|
||||||
|
|
||||||
def test_date_extract_sql(self):
|
def test_date_extract_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'date_extract_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'date_extract_sql'):
|
||||||
self.ops.date_extract_sql(None, None)
|
self.ops.date_extract_sql(None, None)
|
||||||
|
|
||||||
def test_time_extract_sql(self):
|
def test_time_extract_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'date_extract_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'date_extract_sql'):
|
||||||
self.ops.time_extract_sql(None, None)
|
self.ops.time_extract_sql(None, None)
|
||||||
|
|
||||||
def test_date_interval_sql(self):
|
def test_date_interval_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'date_interval_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'date_interval_sql'):
|
||||||
self.ops.date_interval_sql(None)
|
self.ops.date_interval_sql(None)
|
||||||
|
|
||||||
def test_date_trunc_sql(self):
|
def test_date_trunc_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'date_trunc_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'date_trunc_sql'):
|
||||||
self.ops.date_trunc_sql(None, None)
|
self.ops.date_trunc_sql(None, None)
|
||||||
|
|
||||||
def test_time_trunc_sql(self):
|
def test_time_trunc_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'time_trunc_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'time_trunc_sql'):
|
||||||
self.ops.time_trunc_sql(None, None)
|
self.ops.time_trunc_sql(None, None)
|
||||||
|
|
||||||
def test_datetime_trunc_sql(self):
|
def test_datetime_trunc_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'datetime_trunc_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'datetime_trunc_sql'):
|
||||||
self.ops.datetime_trunc_sql(None, None, None)
|
self.ops.datetime_trunc_sql(None, None, None)
|
||||||
|
|
||||||
def test_datetime_cast_date_sql(self):
|
def test_datetime_cast_date_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'datetime_cast_date_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'datetime_cast_date_sql'):
|
||||||
self.ops.datetime_cast_date_sql(None, None)
|
self.ops.datetime_cast_date_sql(None, None)
|
||||||
|
|
||||||
def test_datetime_cast_time_sql(self):
|
def test_datetime_cast_time_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'datetime_cast_time_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'datetime_cast_time_sql'):
|
||||||
self.ops.datetime_cast_time_sql(None, None)
|
self.ops.datetime_cast_time_sql(None, None)
|
||||||
|
|
||||||
def test_datetime_extract_sql(self):
|
def test_datetime_extract_sql(self):
|
||||||
with self.assertRaisesMessage(NotImplementedError, self.may_requre_msg % 'datetime_extract_sql'):
|
with self.assertRaisesMessage(NotImplementedError, self.may_require_msg % 'datetime_extract_sql'):
|
||||||
self.ops.datetime_extract_sql(None, None, None)
|
self.ops.datetime_extract_sql(None, None, None)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue