예제 #1
0
    def test_integration_view_html_settings_links(self) -> None:
        context = dict()
        context['html_settings_links'] = False
        add_integrations_context(context)
        self.assertEqual(context['settings_html'], 'Zulip settings page')
        self.assertEqual(context['subscriptions_html'], 'streams page')

        context = dict()
        context['html_settings_links'] = True
        add_integrations_context(context)
        self.assertEqual(context['settings_html'],
                         '<a href="../../#settings">Zulip settings page</a>')
        self.assertEqual(
            context['subscriptions_html'],
            '<a target="_blank" href="../../#streams">streams page</a>')
예제 #2
0
    def test_integration_view_html_settings_links(self) -> None:
        context = dict()
        context['html_settings_links'] = False
        add_integrations_context(context)
        self.assertEqual(
            context['settings_html'],
            'Zulip settings page')
        self.assertEqual(
            context['subscriptions_html'],
            'streams page')

        context = dict()
        context['html_settings_links'] = True
        add_integrations_context(context)
        self.assertEqual(
            context['settings_html'],
            '<a href="../../#settings">Zulip settings page</a>')
        self.assertEqual(
            context['subscriptions_html'],
            '<a target="_blank" href="../../#streams">streams page</a>')