# Path: nive_cms/tests/__local.py
# WIN = sys.platform.startswith("win")
#     ROOT = "c:\\Temp\\nive_cms\\"
#     ROOT = "/var/tmp/nive_cms/"
# DB_CONF = DatabaseConf(
#     dbName = ROOT+"cms.db",
#     fileRoot = ROOT,
#     context = "Sqlite3"
# )
# MYSQL_CONF = DatabaseConf(
#     context = "MySql",
#     dbName = "ut_nive_cms",
#     host = "localhost",
#     user = "root",
#     password = "",
#     port = "",
#     fileRoot = ROOT
# )
# POSTGRES_CONF = DatabaseConf(
#     context = "PostgreSql",
#     dbName = "ut_nive_cms",
#     host = "localhost",
#     user = "postgres",
#     password = "postgres",
#     port = "",
#     fileRoot = ROOT
# )
# ENABLE_SQLITE_TESTS = True
# ENABLE_MYSQL_TESTS = False
# ENABLE_POSTGRES_TESTS = False
#     class SqliteTestCase(unittest.TestCase):
#     class SqliteTestCase(object):
#     class MySqlTestCase(unittest.TestCase):
#     class MySqlTestCase(object):
#     class PostgreSqlTestCase(unittest.TestCase):
#     class PostgreSqlTestCase(object):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):


import unittest
from pyramid import testing
from pyramid.httpexceptions import HTTPFound
from pyramid.renderers import render
from nive.security import User
from nive_cms.cmsview.view import *
from nive_cms.tests.db_app import *
from nive_cms.tests import __local
        view.meta()
                
        # add forms
        view.context = self.page
        view.add()
        view.context = b1
        view.add()
        view.context = b2
        view.add()
        
        # test html widgets
        view.context = self.page
        view.cmsToolbox(self.page, elements=None)
        view.cmsEditorBlocks(self.page, elements=None)
        
        view.editBlockPage(page=self.page)
        view.editBlockElement(obj=b3)
        view.editBlockColumn(page=self.page, column=b2, name="left")
        view.editBlockList(obj=b1, page=None)
        
        view.elementAddWidget(obj=b5, addResponse=False)
        view.elementListWidget(obj=self.page, elements=None, addResponse=False)
        view.pageListWidget(page=self.root, pages=None)
        
        view.insertPageWidgets()
        view.insertAppWidgets()
        view.insertToolboxWidgets(self.page)
        
        view.breadcrumbs(addHome=0, link=True)
        view.selectType()

# Path: nive_cms/tests/__local.py
# WIN = sys.platform.startswith("win")
#     ROOT = "c:\\Temp\\nive_cms\\"
#     ROOT = "/var/tmp/nive_cms/"
# DB_CONF = DatabaseConf(
#     dbName = ROOT+"cms.db",
#     fileRoot = ROOT,
#     context = "Sqlite3"
# )
# MYSQL_CONF = DatabaseConf(
#     context = "MySql",
#     dbName = "ut_nive_cms",
#     host = "localhost",
#     user = "root",
#     password = "",
#     port = "",
#     fileRoot = ROOT
# )
# POSTGRES_CONF = DatabaseConf(
#     context = "PostgreSql",
#     dbName = "ut_nive_cms",
#     host = "localhost",
#     user = "postgres",
#     password = "postgres",
#     port = "",
#     fileRoot = ROOT
# )
# ENABLE_SQLITE_TESTS = True
# ENABLE_MYSQL_TESTS = False
# ENABLE_POSTGRES_TESTS = False
#     class SqliteTestCase(unittest.TestCase):
#     class SqliteTestCase(object):
#     class MySqlTestCase(unittest.TestCase):
#     class MySqlTestCase(object):
#     class PostgreSqlTestCase(unittest.TestCase):
#     class PostgreSqlTestCase(object):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):
#         def _loadApp(self, mods=None):


# Path: nive_cms/cmsview/tests/test_views.py
import unittest
from pyramid import testing
from pyramid.httpexceptions import HTTPFound
from pyramid.renderers import render
from nive.security import User
from nive_cms.cmsview.view import *
from nive_cms.tests.db_app import *
from nive_cms.tests import __local

        view.meta()
                
        # add forms
        view.context = self.page
        view.add()
        view.context = b1
        view.add()
        view.context = b2
        view.add()
        
        # test html widgets
        view.context = self.page
        view.cmsToolbox(self.page, elements=None)
        view.cmsEditorBlocks(self.page, elements=None)
        
        view.editBlockPage(page=self.page)
        view.editBlockElement(obj=b3)
        view.editBlockColumn(page=self.page, column=b2, name="left")
        view.editBlockList(obj=b1, page=None)
        
        view.elementAddWidget(obj=b5, addResponse=False)
        view.elementListWidget(obj=self.page, elements=None, addResponse=False)
        view.pageListWidget(page=self.root, pages=None)
        
        view.insertPageWidgets()
        view.insertAppWidgets()
        view.insertToolboxWidgets(self.page)
        
        view.breadcrumbs(addHome=0, link=True)
        view.selectType()

        view.selectPageElement()