Skip to content

Commit

Permalink
adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
isnbh0 committed Dec 18, 2024
1 parent 61cac45 commit f0ba357
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 6 additions & 4 deletions granary/tests/test_rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,13 @@ def test_from_as1_missing_objectType_verb(self):
self.assert_multiline_in("""
<item>
<description><![CDATA[foo bar]]></description>
<author>- (Alice)</author>
<author>[email protected] (Alice)</author>
</item>
<item>
<title>a thing I wrote</title>
<link>http://read/this</link>
<description><![CDATA[its gud]]></description>
<author>-</author>
<guid isPermaLink="true">http://read/this</guid>
</item>
""", rss.from_as1([{
Expand All @@ -119,6 +118,7 @@ def test_from_as1_missing_objectType_verb(self):
'displayName': 'Alice',
'url': 'http://it/me',
'image': 'http://my/pic.jpg',
'email': '[email protected]',
},
},
}, {
Expand Down Expand Up @@ -203,16 +203,18 @@ def test_author(self):
'author': {
'objectType':'person',
'displayName':'Mrs. Baz',
'email': '[email protected]',
},
}], feed_url='http://this')
self.assert_multiline_in('<author>- (Mrs. Baz)</author>', got)
self.assert_multiline_in('<author>[email protected] (Mrs. Baz)</author>', got)

def test_author_string_id(self):
got = rss.from_as1([{
'content': 'foo bar',
'author': 'tag:bob',
'email': '[email protected]',
}], feed_url='http://this')
self.assert_multiline_in('<author>- (tag:bob)</author>', got)
self.assert_multiline_in('<author>[email protected] (tag:bob)</author>', got)

def test_order(self):
got = rss.from_as1([
Expand Down
2 changes: 0 additions & 2 deletions granary/tests/testdata/feed_with_audio_video.rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<description><![CDATA[<p>some HTML</p>
<p><audio class="u-audio" src="http://a/podcast.mp3" controls="controls">Your browser does not support the audio tag. <a href="http://a/podcast.mp3">Click here to listen directly.</a></audio>
</p>]]></description>
<author>-</author>
<guid isPermaLink="true">http://podcast/post</guid>
<category>a tag</category>
<enclosure url="http://a/podcast.mp3" length="7770000" type="audio/mpeg"/>
Expand All @@ -38,7 +37,6 @@
<description><![CDATA[
<p><video class="u-video" src="http://a/vidjo.mov" controls="controls" poster="">Your browser does not support the video tag. <a href="http://a/vidjo.mov">Click here to view directly. </a></video>
</p>]]></description>
<author>-</author>
<guid isPermaLink="true">http://vidjo/post</guid>
<enclosure url="http://a/vidjo.mov" length="8880000" type="video/quicktime"/>
<pubDate>Tue, 04 Dec 2012 00:00:00 +0000</pubDate>
Expand Down
1 change: 0 additions & 1 deletion granary/tests/testdata/feed_with_note.rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<img class="u-photo" src="http://pic/2" alt="" />
</a>
</p>]]></description>
<author>-</author>
<guid isPermaLink="true">http://a/note</guid>
<enclosure url="http://pic/1" length="0" type=""/>
<pubDate>Tue, 04 Dec 2012 00:00:00 +0000</pubDate>
Expand Down

0 comments on commit f0ba357

Please sign in to comment.