iro/tests/install.py
branchdevel
changeset 241 546316b0b09c
parent 231 3929338fd17f
child 242 745d829d1e02
equal deleted inserted replaced
240:3406d3bf05d4 241:546316b0b09c
     4 from sqlalchemy import create_engine
     4 from sqlalchemy import create_engine
     5 import os
     5 import os
     6 
     6 
     7 from iro import install
     7 from iro import install
     8 from iro import config
     8 from iro import config
     9 from iro.model.schema import Base
     9 from iro.model.schema import Base, Offer
    10 
    10 from iro.model.utils import WithSession
       
    11 from iro.offer.provider import providers, Provider
    11 from ..test_helpers.dbtestcase import md, SampleDatabase
    12 from ..test_helpers.dbtestcase import md, SampleDatabase
    12 
    13 from ..test_helpers.utils import DummyObserver
    13 class DummyObserver(object):
       
    14     def __init__(self):
       
    15         self.e=[]    
       
    16 
       
    17     def start(self):
       
    18         log.addObserver(self.emit)
       
    19 
       
    20     def stop(self):
       
    21         log.removeObserver(self.emit)
       
    22     
       
    23     def emit(self, eventDict):
       
    24         self.e.append(eventDict)
       
    25 
       
    26 
    14 
    27 class TestInstallation(unittest.TestCase):
    15 class TestInstallation(unittest.TestCase):
    28     '''test install script'''
    16     '''test install script'''
    29    
    17    
    30     def setUp(self):
    18     def setUp(self):