From c2a518cc5a8a6c17aed8b1267f79f8d79207c85b Mon Sep 17 00:00:00 2001 From: John Choi Date: Sat, 21 Dec 2024 21:58:48 +0900 Subject: [PATCH] further adjust test data --- granary/tests/test_rss.py | 4 ++-- .../feed_with_audio_video.as-from-rss.json | 18 ++++++++++++++++-- .../testdata/feed_with_note.as-from-rss.json | 9 ++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/granary/tests/test_rss.py b/granary/tests/test_rss.py index e2578ae4..78f31446 100644 --- a/granary/tests/test_rss.py +++ b/granary/tests/test_rss.py @@ -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': 'bob@example.com', }], feed_url='http://this') - self.assert_multiline_in('bob@example.com (tag:bob)', got) + self.assertNotRegex(got, r'.*') def test_order(self): got = rss.from_as1([ diff --git a/granary/tests/testdata/feed_with_audio_video.as-from-rss.json b/granary/tests/testdata/feed_with_audio_video.as-from-rss.json index f2ac7c3a..624f8a52 100644 --- a/granary/tests/testdata/feed_with_audio_video.as-from-rss.json +++ b/granary/tests/testdata/feed_with_audio_video.as-from-rss.json @@ -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/" + } }] diff --git a/granary/tests/testdata/feed_with_note.as-from-rss.json b/granary/tests/testdata/feed_with_note.as-from-rss.json index 961049eb..478166d6 100644 --- a/granary/tests/testdata/feed_with_note.as-from-rss.json +++ b/granary/tests/testdata/feed_with_note.as-from-rss.json @@ -4,5 +4,12 @@ "objectType": "note", "content": "something i have to say. and just long enough that it has to be ellipsized.\n

\n\n\"\"\n\n

\n

\n\n\"\"\n\n

", "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/" + } }]