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

Proposed by Ines Almeida
Status: Merged
Approved by: Ines Almeida
Approved revision: fc1d0f029482da703c1748cb5642ec9f21b12004
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~ines-almeida/launchpad:social-accounts-update-tests
Merge into: launchpad:master
Diff against target: 55 lines (+1/-27)
2 files modified
lib/lp/app/tests/test_tales.py (+0/-25)
lib/lp/registry/stories/person/xx-person-edit-jabber-ids.rst (+1/-2)
Reviewer Review Type Date Requested Status
Ines Almeida Approve
Review via email: mp+458976@code.launchpad.net

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

To post a comment you must log in.
fc1d0f0... by Ines Almeida

test: fix merge conflict in jabber ui tests

Revision history for this message
Ines Almeida (ines-almeida) wrote :

Auto approving simple test change

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/app/tests/test_tales.py b/lib/lp/app/tests/test_tales.py
2index b219d7e..bbfb36b 100644
3--- a/lib/lp/app/tests/test_tales.py
4+++ b/lib/lp/app/tests/test_tales.py
5@@ -418,31 +418,6 @@ class TestSocialAccountFormatterAPI(TestCaseWithFactory):
6 ),
7 )
8
9- def test_formatted_display_escaping(self):
10- """Social account is displayed as expected even when there is markup"""
11- person = self.factory.makePerson()
12- social_account_set = getUtility(ISocialAccountSet)
13- # Include some bogus markup to check escaping works.
14- identity = {
15- "username": "<b>fred</b>",
16- "homeserver": "ubuntu.com",
17- }
18- social_account = social_account_set.new(
19- person, SocialPlatformType.MATRIX, identity
20- )
21- expected_html = (
22- '<img class="social_accounts__icon" alt="Matrix" title="Matrix" '
23- 'src="/@@/social-matrix" /> <a href=https://matrix.to//#/@%3Cb%3E'
24- 'fred%3C/b%3E:ubuntu.com target="_blank">'
25- "<strong>@%3Cb%3Efred%3C/b%3E:ubuntu.com</strong></a>"
26- )
27- self.assertEqual(
28- expected_html,
29- test_tales(
30- "account/fmt:formatted_display", account=social_account
31- ),
32- )
33-
34
35 class ObjectImageDisplayAPITestCase(TestCaseWithFactory):
36 """Tests for ObjectImageDisplayAPI"""
37diff --git a/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.rst b/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.rst
38index 9566651..b18d91f 100644
39--- a/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.rst
40+++ b/lib/lp/registry/stories/person/xx-person-edit-jabber-ids.rst
41@@ -47,7 +47,7 @@ it will be associated with their account.
42 >>> show_errors(user_browser)
43
44 >>> def show_jabberids(browser):
45- ... tags = find_tags_by_class(browser.contents, "jabber_accounts")
46+ ... tags = find_tags_by_class(browser.contents, "jabber_account")
47 ... for item in tags:
48 ... print(extract_text(item.find("span")))
49 ...
50@@ -68,5 +68,4 @@ checkbox besides the ID:
51 >>> for item in tags.find_all("span"):
52 ... print(extract_text(item))
53 ...
54-
55 No Jabber IDs registered.

Subscribers

People subscribed via source and target branches

to status/vote changes: