@@ -179,7 +179,7 @@ def test_actor(self, _, mock_get, __):
179
179
'url' : 'http://localhost/r/https://foo.com/about-me' ,
180
180
'attachment' : [{
181
181
'type' : 'PropertyValue' ,
182
- 'name' : 'Link ' ,
182
+ 'name' : 'Mrs. ☕ Foo ' ,
183
183
'value' : '<a rel=\" me\" href="https://foo.com/about-me">foo.com/about-me</a>' ,
184
184
}],
185
185
'inbox' : 'http://localhost/foo.com/inbox' ,
@@ -196,6 +196,35 @@ def test_actor(self, _, mock_get, __):
196
196
},
197
197
}, got .json )
198
198
199
+ def test_actor_rel_me_links (self , _ , mock_get , __ ):
200
+ mock_get .return_value = requests_response ("""
201
+ <body>
202
+ <div class="h-card">
203
+ <a class="u-url" rel="me" href="/about-me">Mrs. ☕ Foo</a>
204
+ <a class="u-url" rel="me" href="http://one" title="one title">
205
+ one text
206
+ </a>
207
+ <a class="u-url" rel="me" href="https://two" title=" two title "> </a>
208
+ </div>
209
+ </body>
210
+ """ , url = 'https://foo.com/' , content_type = common .CONTENT_TYPE_HTML )
211
+
212
+ got = self .client .get ('/foo.com' )
213
+ self .assertEqual (200 , got .status_code )
214
+ self .assertEqual ([{
215
+ 'type' : 'PropertyValue' ,
216
+ 'name' : 'Mrs. ☕ Foo' ,
217
+ 'value' : '<a rel="me" href="https://foo.com/about-me">foo.com/about-me</a>' ,
218
+ }, {
219
+ 'type' : 'PropertyValue' ,
220
+ 'name' : 'one text' ,
221
+ 'value' : '<a rel="me" href="http://one">one</a>' ,
222
+ }, {
223
+ 'type' : 'PropertyValue' ,
224
+ 'name' : 'two title' ,
225
+ 'value' : '<a rel="me" href="https://two">two</a>' ,
226
+ }], got .json ['attachment' ])
227
+
199
228
def test_actor_no_hcard (self , _ , mock_get , __ ):
200
229
mock_get .return_value = requests_response ("""
201
230
<body>
0 commit comments