mirror of
https://github.com/django/django.git
synced 2025-08-19 02:01:29 +00:00
Expanded QuerySet.explain() error message if a backend supports no formats.
This commit is contained in:
parent
a32876606f
commit
db83ac48d4
2 changed files with 6 additions and 0 deletions
|
@ -74,6 +74,8 @@ class ExplainTests(TestCase):
|
|||
msg += " Allowed formats: %s" % ", ".join(
|
||||
sorted(connection.features.supported_explain_formats)
|
||||
)
|
||||
else:
|
||||
msg += f" {connection.display_name} does not support any formats."
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
Tag.objects.explain(format="does not exist")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue