Skip to content

Commit

Permalink
further adjust test data
Browse files Browse the repository at this point in the history
isnbh0 authored and snarfed committed Dec 22, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent a576a57 commit 2bef169
Showing 3 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions granary/tests/test_rss.py
Original file line number Diff line number Diff line change
@@ -211,10 +211,10 @@ def test_author(self):
def test_author_string_id(self):
got = rss.from_as1([{
'content': 'foo bar',
'author': 'tag:bob',
'author': 'tag:bob', # should be ignored for RSS
'email': '[email protected]',
}], feed_url='http://this')
self.assert_multiline_in('<author>[email protected] (tag:bob)</author>', got)
self.assertNotRegex(got, r'<author>.*</author>')

def test_order(self):
got = rss.from_as1([
18 changes: 16 additions & 2 deletions granary/tests/testdata/feed_with_audio_video.as-from-rss.json
Original file line number Diff line number Diff line change
@@ -21,7 +21,14 @@
"duration": 328,
"size": 7770000
}],
"author": {"displayName": "-"}
"author": {
"displayName": "Stuff",
"image": [{
"url": "http://example.com/martin/image"
}],
"summary": "some stuff by meee",
"url": "http://site/"
}
},
{
"id": "http://vidjo/post",
@@ -43,5 +50,12 @@
"duration": 428,
"size": 8880000
}],
"author": {"displayName": "-"}
"author": {
"displayName": "Stuff",
"image": [{
"url": "http://example.com/martin/image"
}],
"summary": "some stuff by meee",
"url": "http://site/"
}
}]
9 changes: 8 additions & 1 deletion granary/tests/testdata/feed_with_note.as-from-rss.json
Original file line number Diff line number Diff line change
@@ -4,5 +4,12 @@
"objectType": "note",
"content": "something i have to say. and just long enough that it has to be ellipsized.\n<p>\n<a class=\"link\" href=\"http://a/note\">\n<img alt=\"\" class=\"u-photo\" src=\"http://pic/1\" />\n</a>\n</p>\n<p>\n<a class=\"link\" href=\"http://a/note\">\n<img alt=\"\" class=\"u-photo\" src=\"http://pic/2\" />\n</a>\n</p>",
"published": "2012-12-04T00:00:00+00:00",
"author": {"displayName": "-"}
"author": {
"displayName": "Stuff",
"image": [{
"url": "http://example.com/martin/image"
}],
"summary": "some stuff by meee",
"url": "http://site/"
}
}]

0 comments on commit 2bef169

Please sign in to comment.