Project

General

Profile

Revision 15636990

ID15636990ac4281003a118159a06034755fea2070
Parent 7365fb51
Child 89fe9e96

Added by Francois POIROTTE over 14 years ago

Suppression des dossiers model/ des différentes applications turbogears (le modèle est partagé dans vigilo.models).
Mise à jour des autres fichiers en conséquence.

Suppression des fonctions "runtests" des différentes applications,
la gestion des tests est faite via les Makefile directement à présent.

Mise à jour des settings de tests du corrélateur.
Ajout des settings et settings de tests dans Vigigraph.

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@1757 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

development.ini
16 16

  
17 17
[server:main]
18 18
use = egg:Paste#http
19
host = 127.0.0.1 
19
host = 0.0.0.0 
20 20
port = 8080
21 21

  
22 22
[app:main]
......
115 115
qualname = vigiboard
116 116

  
117 117
[logger_sqlalchemy]
118
level = INFO
119
handlers = sql_log
118
level = DEBUG
119
handlers = console
120
#sql_log
120 121
qualname = sqlalchemy.engine
121 122

  
122 123
# A logger for authentication, identification and authorization -- this is
setup.py
39 39
        "decorator != 3.1.0", # Blacklist bad version
40 40
        "vigilo-turbogears",
41 41
        #"modwsgideploy",
42
        ],
42
    ],
43 43

  
44 44
    paster_plugins=['PasteScript', 'Pylons', 'TurboGears2', 'tg.devtools'],
45 45
    packages=find_packages(exclude=['ez_setup']),
......
48 48
    tests_require=tests_require,
49 49
    extras_require={
50 50
        'tests': tests_require,
51
        },
51
    },
52 52
    package_data={'vigiboard': [
53 53
            'i18n/*/LC_MESSAGES/*.mo',
54
        ]},
54
    ]},
55 55
    message_extractors={'vigiboard': [
56 56
            ('**.py', 'python', None),
57
        ]},
57
    ]},
58 58

  
59 59
    entry_points={
60 60
        'paste.app_factory': [
61 61
            'main = vigiboard.config.middleware:make_app',
62
            ],
62
        ],
63 63
        'paste.app_install': [
64 64
            'main = pylons.util:PylonsInstaller',
65
            ],
66
        'console_scripts': [
67
            'runtests-vigiboard = vigiboard.tests:runtests',
68
            'paster = paste.script.command:run',
69
            ],
70
        },
65
        ],
66
    },
71 67
)
72 68

  
vigiboard/tests/__init__.py
12 12
import nose
13 13
from nose.tools import eq_, nottest
14 14

  
15
from vigilo.common.conf import settings
16 15
from vigilo.models.vigilo_bdd_config import metadata
17 16
from vigilo.models.session import DBSession
18 17

  
19
metadata.bind = DBSession.bind
20

  
21 18
__all__ = ['setup_db', 'teardown_db', 'TestController', 'url_for']
22 19

  
20
metadata.bind = DBSession.bind
21

  
23 22
def setup_db():
24 23
    """Method used to build a database"""
25 24
    metadata.create_all()
......
69 68
        teardown_db()
70 69
        del self.app
71 70

  
72
def runtests(*args):
73
    """This is the method called when running unit tests."""
74
    sys.argv[1:0] = ['--with-pylons', '../vigiboard/test.ini', 
75
                     '--with-coverage', '--cover-inclusive',
76
                     '--cover-erase', '--cover-package', 'vigiboard',
77
                     'vigiboard/tests' ]
78
    nose.main()
79

  
vigiboard/tests/functional/test_authentication.py
57 57
        assert home_page.request.cookies.get('authtkt') == '', \
58 58
               'Session cookie was not deleted: %s' % home_page.request.cookies
59 59
        assert home_page.location == 'http://localhost/', home_page.location
60

  

Also available in: Unified diff