kopia lustrzana https://github.com/snarfed/bridgy-fed
test fix for 86079c3684
rodzic
907e6e7aeb
commit
114ba69d3b
|
@ -2832,6 +2832,19 @@ class WebUtilTest(TestCase):
|
|||
|
||||
def test_convert_translates_ids(self, *_):
|
||||
self.store_object(id='http://fed/post', source_protocol='activitypub')
|
||||
obj = self.store_object(id='fake:reply', source_protocol='fake', our_as1={
|
||||
'objectType': 'activity',
|
||||
'verb': 'post',
|
||||
'object': {
|
||||
'id': 'fake:reply',
|
||||
'objectType': 'note',
|
||||
'inReplyTo': 'http://fed/post',
|
||||
'author': {
|
||||
'id': 'fake:alice',
|
||||
'displayName': 'Ms. Alice',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
self.assert_multiline_in("""\
|
||||
<article class="h-entry">
|
||||
|
@ -2844,19 +2857,7 @@ class WebUtilTest(TestCase):
|
|||
<div class="">
|
||||
</div>
|
||||
<a class="u-in-reply-to" href="https://ap.brid.gy/convert/web/http://fed/post"></a>
|
||||
</article>""", Web.convert(Object(our_as1={
|
||||
'objectType': 'activity',
|
||||
'verb': 'post',
|
||||
'object': {
|
||||
'id': 'fake:reply',
|
||||
'objectType': 'note',
|
||||
'inReplyTo': 'http://fed/post',
|
||||
'author': {
|
||||
'id': 'fake:alice',
|
||||
'displayName': 'Ms. Alice',
|
||||
},
|
||||
},
|
||||
}), from_user=None), ignore_blanks=True)
|
||||
</article>""", Web.convert(obj, from_user=None), ignore_blanks=True)
|
||||
|
||||
def test_target_for(self, _, __):
|
||||
self.assertIsNone(Web.target_for(Object(id='x')))
|
||||
|
|
Ładowanie…
Reference in New Issue