Project

General

Profile

Revision 747e30c3

ID747e30c30996473de501f78479645de386731902
Parent 5d6ce1f5
Child d47b4c3d

Added by Francois POIROTTE about 14 years ago

Utilisation de unitest.TestCase dans les tests de VigiBoard.

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

View differences:

vigiboard/tests/__init__.py
4 4
from os import path, environ
5 5
import sys
6 6

  
7
import unittest
7 8
from tg import config
8 9
from paste.deploy import loadapp
9 10
from paste.script.appinstall import SetupCommand
10 11
from routes import url_for
11 12
from webtest import TestApp
12
from nose.tools import eq_
13 13

  
14 14
from vigilo.models.session import metadata, DBSession
15 15

  
......
27 27
    engine = config['pylons.app_globals'].sa_engine
28 28
    metadata.drop_all(engine)
29 29

  
30
class TestController(object):
30
class TestController(unittest.TestCase):
31 31
    """
32 32
    Base functional test case for the controllers.
33 33
    
......
46 46
    
47 47
    application_under_test = 'main_without_authn'
48 48

  
49
    def __init__(self):
50
        object.__init__(self)
51
    
52 49
    def setUp(self):
53 50
        """Method called by nose before running each test"""
54 51
        # Loading the application:
55
        setup_db()
56 52
        conf_dir = config.here
57 53
        wsgiapp = loadapp('config:test.ini#%s' %
58 54
            self.application_under_test, relative_to=conf_dir)
vigiboard/tests/functional/test_history_table.py
105 105
    sur un événement brut.
106 106
    """
107 107

  
108
    def setUp(self):
109
        super(TestHistoryTable, self).setUp()
110

  
111 108
    def test_cause_host_history(self):
112 109
        """Historique de la cause d'un événement corrélé sur un hôte."""
113 110

  

Also available in: Unified diff