Skip to content

Instantly share code, notes, and snippets.

@margareteldridge
Last active December 2, 2021 19:01
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/1602c1980a651e346d480c7fb595f382 to your computer and use it in GitHub Desktop.
Save margareteldridge/1602c1980a651e346d480c7fb595f382 to your computer and use it in GitHub Desktop.
class testme(unittest.TestCase):
def test_recognizesEntries(self):
url = "http://agileinaflash.com/feeds/posts/default"
content = urllib2.urlopen(url).read() # 1
self.assertGreater(len(content),0) # 2
open("localfeed.rss", "w").write(content) # 3
sut = ArticleRssParser('localfeed.rss') # 4
self.assertTrue(sut.HasArticles())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment