File: test_toolbar.py

package info (click to toggle)
python-django-debug-toolbar 1%3A5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,984 kB
  • sloc: python: 6,880; javascript: 631; makefile: 62; sh: 16
file content (17 lines) | stat: -rw-r--r-- 557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from django.core.exceptions import ImproperlyConfigured

from debug_toolbar.toolbar import debug_toolbar_urls
from tests.base import BaseTestCase


class DebugToolbarUrlsTestCase(BaseTestCase):
    def test_empty_prefix_errors(self):
        with self.assertRaises(ImproperlyConfigured):
            debug_toolbar_urls(prefix="")

    def test_empty_when_debug_is_false(self):
        self.assertEqual(debug_toolbar_urls(), [])

    def test_has_path(self):
        with self.settings(DEBUG=True):
            self.assertEqual(len(debug_toolbar_urls()), 1)