Mercurial > hg > Feedworm
comparison tests/couchdb/FeedTests.py @ 136:7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 23 Aug 2011 04:15:46 +0200 |
parents | |
children | 1220e62b63dd |
comparison
equal
deleted
inserted
replaced
135:b2ef673607e3 | 136:7217b060b39c |
---|---|
1 | |
2 from backend.couchdb.Feed import Feed | |
3 from backend.couchdb.CouchDbBackend import CouchDbBackend | |
4 import unittest | |
5 | |
6 class Test(unittest.TestCase): | |
7 def setUp(self): | |
8 self.database = CouchDbBackend().database | |
9 | |
10 def _testAllFeeds(self): | |
11 allFeeds = Feed.all(self.database) | |
12 self.assertEqual(2, len(allFeeds)) | |
13 | |
14 def testFeedPropertyAccess(self): | |
15 feed = Feed.all(self.database)[0] | |
16 self.assertEquals("BBC", feed.title) | |
17 | |
18 if __name__ == "__main__": | |
19 #import sys;sys.argv = ['', 'Test.testName'] | |
20 unittest.main() |