Exemple #1
0
 def test_app_process_index(self):
     save_dir = os.getcwd()
     try:
         os.chdir(zoom.tools.zoompath(self.apps_dir, 'sample'))
         app = zoom.App()
         request = build('http://localhost/sample', {})
         request.site = zoom.sites.Site()
         response = app(request)
         self.assertEqual(type(response), zoom.Page)
     finally:
         os.chdir(save_dir)
Exemple #2
0
 def test_app_process_module(self):
     save_dir = os.getcwd()
     try:
         os.chdir(zoom.tools.zoompath('web/apps/sample'))
         app = zoom.App()
         request = build('http://localhost/sample/parts', {})
         request.site = zoom.site.Site(self.request)
         request.site.db = zoom.database.setup_test()
         response = app(request)
         self.assertEqual(type(response), zoom.Page)
     finally:
         os.chdir(save_dir)
Exemple #3
0
 def test_app_process_method(self):
     save_dir = os.getcwd()
     try:
         os.chdir(zoom.tools.zoompath(self.apps_dir, 'sample'))
         app = zoom.App()
         request = build('http://localhost/sample/about', {})
         request.site = zoom.site.Site(self.request)
         request.site.db = zoom.database.setup_test()
         response = app(request)
         self.assertEqual(type(response), str)
     finally:
         os.chdir(save_dir)
Exemple #4
0
import zoom

app = zoom.App()


Exemple #5
0
"""
    Main App Module

    This is the entrypoint to every app.
"""

import zoom

app = zoom.App(['Overview', 'About'])