Skip to content

Instantly share code, notes, and snippets.

@margareteldridge
Last active December 2, 2021 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save margareteldridge/d6ae76b277627219f1148e13c447e039 to your computer and use it in GitHub Desktop.
Save margareteldridge/d6ae76b277627219f1148e13c447e039 to your computer and use it in GitHub Desktop.
class basic_feed_parsing(unittest.TestCase):
def test_reports_it_has_articles_from_2_article_feed(self):
mocks = mox.Mox()
mocks.StubOutWithMock(ArticleRssParser, 'get_feed_content')
ArticleRssParser\
.get_feed_content('fakefilename')\
.AndReturn(sample_with_2_entries)
mocks.ReplayAll()
parser = ArticleRssParser("fakefilename")
self.assertTrue(parser.HasArticles())
mocks.VerifyAll()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment