def test_doesnt_linkify_for_non_developers(self):
        # OOPS IDs won't be linkified for non-developers.
        oops_id = 'OOPS-12345TEST'
        formatter = FormattersAPI(oops_id)
        formatted_string = formatter.oops_id()

        self.assertEqual(
            oops_id, formatted_string,
            "Formatted string should be '%s', was '%s'" % (
                oops_id, formatted_string))
Exemple #2
0
    def test_doesnt_linkify_for_non_developers(self):
        # OOPS IDs won't be linkified for non-developers.
        oops_id = 'OOPS-12345TEST'
        formatter = FormattersAPI(oops_id)
        formatted_string = formatter.oops_id()

        self.assertEqual(
            oops_id, formatted_string,
            "Formatted string should be '%s', was '%s'" %
            (oops_id, formatted_string))
    def test_linkifies_for_developers(self):
        # OOPS IDs will be linkified for Launchpad developers.
        oops_id = 'OOPS-12345TEST'
        formatter = FormattersAPI(oops_id)
        self._setDeveloper(True)
        formatted_string = formatter.oops_id()

        expected_string = '<a href="%s">%s</a>' % (
            config.launchpad.oops_root_url + oops_id, oops_id)

        self.assertEqual(
            expected_string, formatted_string,
            "Formatted string should be '%s', was '%s'" % (
                expected_string, formatted_string))
Exemple #4
0
    def test_linkifies_for_developers(self):
        # OOPS IDs will be linkified for Launchpad developers.
        oops_id = 'OOPS-12345TEST'
        formatter = FormattersAPI(oops_id)
        self._setDeveloper(True)
        formatted_string = formatter.oops_id()

        expected_string = '<a href="%s">%s</a>' % (
            config.launchpad.oops_root_url + oops_id, oops_id)

        self.assertEqual(
            expected_string, formatted_string,
            "Formatted string should be '%s', was '%s'" %
            (expected_string, formatted_string))