Ejemplo n.º 1
0
 def setUp(self):
     super().setUp()
     injector = self.get_injector(PresentersModule(),
                                  SystematicGuiPluginModule())
     load_table_data(['systematik', 'sverweis'], self.engine)
     self.presenter = injector.get(SYSTEMATIC_POINT_SELECTION_PRESENTER_KEY)
     self.view = MagicMock(spec=SystematicPointSelectionDialog)
     self.presenter.view = self.view
Ejemplo n.º 2
0
    def setUp(self):
        super().setUp()

        self.injector = self.get_injector(PresentersModule(),
                                          SystematicGuiPluginModule())
        load_table_data(['systematik', 'sverweis'], self.engine)

        self.presenter = self.injector.get(
            SYSTEMATIC_MENU_ADDITIONS_PRESENTER_KEY)
        self.service = self.injector.get(SYSTEMATIC_SERVICE_KEY)
        self.view = MagicMock()
        self.presenter.view = self.view
        self.tree = self.service.get_systematic_tree()
Ejemplo n.º 3
0
 def setUp(self):
     super().setUp()
     self.injector = self.get_injector(PresentersModule(),
                                       SystematicGuiPluginModule())
     load_table_data(['systematik', 'sverweis'], self.engine)
     self.systematic_service = self.injector.get(SYSTEMATIC_SERVICE_KEY)
     self.document_dao = self.injector.get(
         baseinjectorkeys.DOCUMENT_DAO_KEY)
     self.systematic_dao = self.injector.get(SYSTEMATIC_DAO_KEY)
     self.presenter = self.injector.get(
         DOCUMENT_SYSTEMATIC_REFERENCES_PRESENTER_KEY)
     self.view = MagicMock(spec=DocumentSystematicReferenceView)
     self.presenter.view = self.view
    def get_injector(self, *test_modules):

        essential_modules = (AlexBaseModule(), DaoModule(), ServiceModule(),
                             IntegrationTestModule())
        injector = Injector(essential_modules + test_modules)

        self.engine = injector.get(baseinjectorkeys.DB_ENGINE_KEY)
        setup_database_schema(self.engine)
        load_table_data(test_base.tables, self.engine)

        self.message_broker = injector.get(guiinjectorkeys.MESSAGE_BROKER_KEY)
        self.message_broker.subscribe(self)

        return injector
    def __init__(self, additional_modules=[]):
        super().__init__()
        additional_modules.append('acceptance.AcceptanceTestUtils')
        self.gui_initialized = False

        # Build up environment
        self.env = TestEnvironment(mode=MODE_FULL, additional_modules=additional_modules)

        # Initialize dependency injection
        self.injector = build_injector()
        
        # Set up database
        engine = self.injector.get(baseinjectorkeys.DB_ENGINE_KEY)
        setup_database_schema(engine)
        load_table_data(tables, engine)
        
        # Get basic gui element
        self.success = False
        self.main_runner = self.injector.get(guiinjectorkeys.MAIN_RUNNER_KEY)
        self.event_window = self.injector.get(guiinjectorkeys.EVENT_WINDOW_KEY)
        self.event_window_presenter = self.injector.get(guiinjectorkeys.EVENT_WINDOW_PRESENTER_KEY)
        self.document_window = self.injector.get(guiinjectorkeys.DOCUMENT_WINDOW_KEY)
        self.document_window_presenter = self.injector.get(guiinjectorkeys.DOCUMENT_WINDOW_PRESENTER_KEY)
 def setUp(self):
     super().setUp()
     load_table_data(['systematik', 'sverweis'], self.engine)
     self.dao = DocumentSystematicRelationsDao(self.engine)
Ejemplo n.º 7
0
 def setUp(self):
     super().setUp()
     load_table_data(['systematik', 'sverweis'], self.engine)
     self.systematic_dao = SystematicDao(self.engine)
     self.service = SystematicPdfGenerationService(self.systematic_dao)
Ejemplo n.º 8
0
 def setUp(self):
     self.test_environment = TestEnvironment()
     self.injector = Injector([DaoModule()])
     self.engine = self.injector.get(Engine)
     setup_database_schema(self.engine)
     load_table_data(tables, self.engine)
 def setUp(self):
     super().setUp()
     load_table_data(['systematik', 'sverweis'], self.engine)
     self.dao = SystematicDao(self.engine)