← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ines-almeida/launchpad:social-accounts-update-tests into launchpad:master

 

Ines Almeida has proposed merging ~ines-almeida/launchpad:social-accounts-update-tests into launchpad:master.

Commit message:
test: remove social accounts test that no longer makes sense
    
After the API validation was updated to not allow markup in username and domain, this test no longer makes sense as we are not allowing markup in the SocialAccount.identity fields anymore


Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/458976
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:social-accounts-update-tests into launchpad:master.
diff --git a/lib/lp/app/tests/test_tales.py b/lib/lp/app/tests/test_tales.py
index b219d7e..bbfb36b 100644
--- a/lib/lp/app/tests/test_tales.py
+++ b/lib/lp/app/tests/test_tales.py
@@ -418,31 +418,6 @@ class TestSocialAccountFormatterAPI(TestCaseWithFactory):
             ),
         )
 
-    def test_formatted_display_escaping(self):
-        """Social account is displayed as expected even when there is markup"""
-        person = self.factory.makePerson()
-        social_account_set = getUtility(ISocialAccountSet)
-        # Include some bogus markup to check escaping works.
-        identity = {
-            "username": "<b>fred</b>",
-            "homeserver": "ubuntu.com",
-        }
-        social_account = social_account_set.new(
-            person, SocialPlatformType.MATRIX, identity
-        )
-        expected_html = (
-            '<img class="social_accounts__icon" alt="Matrix" title="Matrix" '
-            'src="/@@/social-matrix" /> <a href=https://matrix.to//#/@%3Cb%3E'
-            'fred%3C/b%3E:ubuntu.com target="_blank">'
-            "<strong>@%3Cb%3Efred%3C/b%3E:ubuntu.com</strong></a>"
-        )
-        self.assertEqual(
-            expected_html,
-            test_tales(
-                "account/fmt:formatted_display", account=social_account
-            ),
-        )
-
 
 class ObjectImageDisplayAPITestCase(TestCaseWithFactory):
     """Tests for ObjectImageDisplayAPI"""