annotate tests/couchdb/FeedTests.py @ 150:babe14449162

the entries for the selected feeds had to be set onto the item delegate so had access to the selected feed entry. Keep the list in one place only (the model) and access it from the item delegate.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 27 Aug 2011 06:43:28 +0200
parents 7217b060b39c
children 1220e62b63dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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()