Skip to content

Commit

Permalink
further adjust test data
Browse files Browse the repository at this point in the history
  • Loading branch information
isnbh0 committed Dec 21, 2024
1 parent 85d0934 commit c2a518c
Show file tree
Hide file tree
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
Expand Up @@ -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([
Expand Down
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
Expand Up @@ -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",
Expand All @@ -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
Expand Up @@ -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 c2a518c

Please sign in to comment.