diff options
author | Tim Graham <timograham@gmail.com> | 2022-04-13 20:17:00 -0400 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-04-14 06:46:42 +0200 |
commit | db83ac48d4015ce3487405481426c3d2d38335df (patch) | |
tree | 0e421a63a0f7ec35472682007d10aacb5b8d1bb0 /tests/queries | |
parent | a32876606f1346d4fbdab3813061f8a79cb23ac2 (diff) | |
download | django-db83ac48d4015ce3487405481426c3d2d38335df.tar.gz |
Expanded QuerySet.explain() error message if a backend supports no formats.
Diffstat (limited to 'tests/queries')
-rw-r--r-- | tests/queries/test_explain.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/queries/test_explain.py b/tests/queries/test_explain.py index 1d17ef8191..f61fe01e9d 100644 --- a/tests/queries/test_explain.py +++ b/tests/queries/test_explain.py @@ -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") |