annotate tests/couchdb/FeedTests.py @ 185:0b4c8dc13b7c

when replicating pull from remote first
author dirk
date Mon, 12 Sep 2011 11:07:58 +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()