def setup_module(mod): utils.setup_site(mod) mod.app = server.app # overwrite _cleanup to make it possible to have transactions spanning multiple requests. mod.app.do_cleanup = mod.app._cleanup mod.app._cleanup = lambda: None
def setup_module(mod): utils.setup_site(mod) type_book = { "key": "/type/book", "kind": "regular", "type": {"key": "/type/type"}, "properties": [{ "name": "title", "expected_type": {"key": "/type/string"}, "unique": True }, { "name": "authors", "expected_type": {"key": "/type/author"}, "unique": False }, { "name": "publish_year", "expected_type": {"key": "/type/int"}, "unique": True }, { "name": "links", "expected_type": {"key": "/type/link"}, "unique": False }] } type_author = { "key": "/type/author", "kind": "regular", "type": {"key": "/type/type"}, "properties": [{ "name": "name", "expected_type": {"key": "/type/string"}, "unique": True }] } type_link = { "key": "/type/link", "kind": "embeddable", "type": {"key": "/type/type"}, "properties": [{ "name": "title", "expected_type": {"key": "/type/string"}, "unique": True }, { "name": "url", "expected_type": {"key": "/type/string"}, "unique": True }] } mod.site.save_many([type_book, type_author, type_link])
def setup_module(mod): utils.setup_site(mod)