def test_navigation_bar_hooks(self):
        entry = {
            'label': 'Test Nav Entry',
            'url': 'foo-url',
        }

        hook = NavigationBarHook(extension=self.extension, entries=[entry])

        request = self.client.request()
        request.user = User(username='text')

        context = Context({
            'request': request,
            'local_site_name': 'test-site',
        })
        entries = hook.get_entries(context)
        self.assertEqual(len(entries), 1)
        self.assertEqual(entries[0], entry)

        t = Template(
            '{% load rb_extensions %}'
            '{% navigation_bar_hooks %}')

        self.assertEqual(t.render(context).strip(),
                         '<li><a href="%(url)s">%(label)s</a></li>' % entry)
Tests rendering of an integer value.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/extensions/tests.py/HookTests.test_navigation_bar_hooks--crossover with--dataset/ETHPy150Open django-erp/django-erp/djangoerp/core/tests.py/RenderingValueToStringCase.test_integer_value_to_string