mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #32061 -- Unified DatabaseClient.runshell() in db backends.
This commit is contained in:
parent
4ac2d4fa42
commit
bbe6fbb876
16 changed files with 272 additions and 206 deletions
16
tests/backends/base/test_client.py
Normal file
16
tests/backends/base/test_client.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
from django.db import connection
|
||||
from django.db.backends.base.client import BaseDatabaseClient
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
|
||||
class SimpleDatabaseClientTests(SimpleTestCase):
|
||||
def setUp(self):
|
||||
self.client = BaseDatabaseClient(connection=connection)
|
||||
|
||||
def test_settings_to_cmd_args_env(self):
|
||||
msg = (
|
||||
'subclasses of BaseDatabaseClient must provide a '
|
||||
'settings_to_cmd_args_env() method or override a runshell().'
|
||||
)
|
||||
with self.assertRaisesMessage(NotImplementedError, msg):
|
||||
self.client.settings_to_cmd_args_env(None, None)
|
Loading…
Add table
Add a link
Reference in a new issue