from django.test import TestCase

from conman.nav_tree.handlers import SimpleHandler
from ..handlers import NodeRedirectHandler
from ..views import NodeRedirectView


class TestNodeRedirectHandler(TestCase):
    def test_heritage(self):
        self.assertTrue(issubclass(NodeRedirectHandler, SimpleHandler))

    def test_view(self):
        view = NodeRedirectHandler.view
        expected = NodeRedirectView.as_view()

        self.assertEqual(view.__name__, expected.__name__)
        self.assertEqual(view.__module__, expected.__module__)

from django.test import TestCase

from conman.nav_tree.handlers import SimpleHandler
from ..handlers import NodeRedirectHandler
from ..views import NodeRedirectView


class TestNodeRedirectHandler(TestCase):
    def test_heritage(self):
        """NodeRedirectHandler sublcasses SimpleHandler."""
        self.assertTrue(issubclass(NodeRedirectHandler, SimpleHandler))

    def test_view(self):
        """NodeRedirectHandler uses the NodeRedirectView."""
        view = NodeRedirectHandler.view
        expected = NodeRedirectView.as_view()

        self.assertEqual(view.__name__, expected.__name__)
        self.assertEqual(view.__module__, expected.__module__)

Add docstrings to redirects.tests.test_handlers