--- a/test.py Fri Jan 11 17:25:22 2013 +0900
+++ b/test.py Fri Jan 11 17:33:00 2013 +0900
+from itertools import chain
from unittest import TestCase, main
from app import app, init_db
def create_resource(self):
url = self.list_url % self.workspace
data = json.loads(response.data)
self.assertTrue(any(resource.get('_id', None) == resource_id for resource in data))
+ url = self.all_url % self.workspace
+ response = self.c.get(url)
+ data = json.loads(response.data)
+ self.assertTrue(any(resource.get('_id', None) == resource_id for resource in chain(*data.values())))
def update_resource(self, resource_id):
url = self.item_url % (self.workspace, resource_id)