# Path: pyfusion/test/tests.py
# def find_subclasses(module, input_class):
#     mod_list = [i for i in pkgutil.walk_packages(module.__path__, module.__name__+'.')]
#     output = []
#     
#     for tmp_instance, mod_name, is_pack  in mod_list:
#         __import__(mod_name)
#         for name, cls in inspect.getmembers(sys.modules[mod_name]):
#             if inspect.isclass(cls) and issubclass(cls, input_class) and cls != input_class:
#                 output.append(cls)
#     return output
# 
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass
# 
# class SQLTestCase(BasePyfusionTestCase):
# 
#     def setUp(self):
#         pyfusion.orm_manager.shutdown_orm()
#         pyfusion.conf.utils.clear_config()
#         pyfusion.conf.utils.read_config(TEST_CONFIG_FILE)
# 
# class NoSQLTestCase(BasePyfusionTestCase):
# 
#     def setUp(self):
#         pyfusion.orm_manager.shutdown_orm()
#         pyfusion.conf.utils.clear_config()
#         pyfusion.conf.utils.read_config(TEST_NOSQL_CONFIG_FILE)
# 
# TEST_FLAGS = ['dev']


import pyfusion
from pyfusion.test.tests import find_subclasses, PfTestBase, SQLTestCase, NoSQLTestCase, TEST_FLAGS



for test_class in find_subclasses(pyfusion, PfTestBase):
    globals()['TestSQL%s' %test_class.__name__] = type('TestSQL%s' %test_class.__name__, (test_class, SQLTestCase), {})
    globals()['TestSQL%s' %test_class.__name__].sql = True
    globals()['TestSQL%s' %test_class.__name__].generated = True

# Path: pyfusion/test/tests.py
# def find_subclasses(module, input_class):
#     mod_list = [i for i in pkgutil.walk_packages(module.__path__, module.__name__+'.')]
#     output = []
#     
#     for tmp_instance, mod_name, is_pack  in mod_list:
#         __import__(mod_name)
#         for name, cls in inspect.getmembers(sys.modules[mod_name]):
#             if inspect.isclass(cls) and issubclass(cls, input_class) and cls != input_class:
#                 output.append(cls)
#     return output
# 
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass
# 
# class SQLTestCase(BasePyfusionTestCase):
# 
#     def setUp(self):
#         pyfusion.orm_manager.shutdown_orm()
#         pyfusion.conf.utils.clear_config()
#         pyfusion.conf.utils.read_config(TEST_CONFIG_FILE)
# 
# class NoSQLTestCase(BasePyfusionTestCase):
# 
#     def setUp(self):
#         pyfusion.orm_manager.shutdown_orm()
#         pyfusion.conf.utils.clear_config()
#         pyfusion.conf.utils.read_config(TEST_NOSQL_CONFIG_FILE)
# 
# TEST_FLAGS = ['dev']


# Path: pyfusion/test/generated_tests.py
import pyfusion
from pyfusion.test.tests import find_subclasses, PfTestBase, SQLTestCase, NoSQLTestCase, TEST_FLAGS




for test_class in find_subclasses(pyfusion, PfTestBase):
    globals()['TestSQL%s' %test_class.__name__] = type('TestSQL%s' %test_class.__name__, (test_class, SQLTestCase), {})
    globals()['TestSQL%s' %test_class.__name__].sql = True
    globals()['TestSQL%s' %test_class.__name__].generated = True

    globals()['TestNoSQL%s' %test_class.__name__] = type('TestNoSQL%s' %test_class.__name__, (test_class, NoSQLTestCase), {})