Mercurial > hg > Feedworm
view tests/FeedUpdaterTests.py @ 235:a34cb404cef3
remove the Ui_ prefix from the Qt designer files - The eric IDE will add it without any configuration. Rewrite the Makefile to behave as eric.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 26 Jan 2015 13:38:55 +0100 |
parents | bb3c851b18b1 |
children | 7c719c4f5655 |
line wrap: on
line source
# -*- coding: utf-8 -*- import unittest from Feed import Feed from FeedUpdater import FeedUpdater from FeedUpdater import FeedUpdateException class FeedUpdaterTests(unittest.TestCase): def testFeedContainsInvalidUrl(self): feed = Feed("invalid", "http://thisurldoesnotexist.xxx") try: FeedUpdater(None, feed).update() self.fail("updating an invalid URL must fail") except FeedUpdateException: # this one was expected pass def testFeedContainsValidUrl(self): feed = Feed("valid", "http://www.joelonsoftware.com/rss.xml") result = FeedUpdater(None, feed).getFeed() self.assertEqual("Joel on Software", result["feed"].title) if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] unittest.main()