source: main/branches/3D/openPLM/plmapp/tests/__init__.py @ 662

Revision 662, 2.2 KB checked in by pcosquer, 9 years ago (diff)

3D branch: merge changes from trunk (rev [661])

Line 
1############################################################################
2# openPLM - open source PLM
3# Copyright 2010 Philippe Joulaud, Pierre Cosquer
4#
5# This file is part of openPLM.
6#
7#    openPLM is free software: you can redistribute it and/or modify
8#    it under the terms of the GNU General Public License as published by
9#    the Free Software Foundation, either version 3 of the License, or
10#    (at your option) any later version.
11#
12#    openPLM is distributed in the hope that it will be useful,
13#    but WITHOUT ANY WARRANTY; without even the implied warranty of
14#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15#    GNU General Public License for more details.
16#
17#    You should have received a copy of the GNU General Public License
18#    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
19#
20# Contact :
21#    Philippe Joulaud : ninoo.fr@gmail.com
22#    Pierre Cosquer : pierre.cosquer@insa-rennes.fr
23################################################################################
24
25# import custom application models
26from django.conf import settings
27for app in settings.INSTALLED_APPS:
28    if app.startswith("openPLM"):
29        __import__("%s.models" % app, globals(), locals(), [], -1)
30
31import openPLM.plmapp.search_indexes
32
33from openPLM.plmapp.tests.filehandlers import *
34from openPLM.plmapp.tests.controllers import *
35from openPLM.plmapp.tests.lifecycle import *
36from openPLM.plmapp.tests.views import *
37from openPLM.plmapp.tests.ajax import *
38from openPLM.plmapp.tests.api import *
39from openPLM.plmapp.tests.csvimport import *
40from openPLM.plmapp.tests.archive import *
41
42import openPLM.plmapp.models
43from openPLM.plmapp.lifecycle import LifecycleList
44def get_doctest(module_name):
45    test_dict={}
46    module = __import__(module_name,{},{},module_name.split('.')[-1])
47    for obj_name,obj in module.__dict__.items():
48        if '__module__' in dir(obj) and obj.__module__ == module_name:
49            if obj.__doc__:
50                test_dict[obj_name] = obj
51                return test_dict
52
53__test__ = get_doctest("openPLM.plmapp.utils")
54__test__.update(get_doctest("openPLM.plmapp.controllers.plmobject"))
55__test__.update(get_doctest("openPLM.plmapp.lifecycle"))
56
Note: See TracBrowser for help on using the repository browser.