Mercurial > hg > Feedworm
annotate tests/couchdb/FeedTests.py @ 173:3bcf39181f6e
pull the calculation of the epxire date up into AbstractBackend
author | dirk |
---|---|
date | Fri, 09 Sep 2011 17:19:16 +0200 |
parents | 7217b060b39c |
children | 1220e62b63dd |
rev | line source |
---|---|
136
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
1 |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
2 from backend.couchdb.Feed import Feed |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
3 from backend.couchdb.CouchDbBackend import CouchDbBackend |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
4 import unittest |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
5 |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
6 class Test(unittest.TestCase): |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
7 def setUp(self): |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
8 self.database = CouchDbBackend().database |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
9 |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
10 def _testAllFeeds(self): |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
11 allFeeds = Feed.all(self.database) |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
12 self.assertEqual(2, len(allFeeds)) |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
13 |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
14 def testFeedPropertyAccess(self): |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
15 feed = Feed.all(self.database)[0] |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
16 self.assertEquals("BBC", feed.title) |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
17 |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
18 if __name__ == "__main__": |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
19 #import sys;sys.argv = ['', 'Test.testName'] |
7217b060b39c
implement a Feed class that can be used to query feed and that wraps view results
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff
changeset
|
20 unittest.main() |