Ejemplo n.º 1
0
def initilise_application():
    """
    Setup the application before it is run.
    """
    global LANDSCAPE
    if not LANDSCAPE:
        LANDSCAPE = lm.LandscapeManager()
 def setUp(self):
     manager = landscape_manager.LandscapeManager(utils.TEST_CONFIG_FILE)
     self.graph_db = manager.graph_db
     self.graph_db.delete_all()
     self.graph_db.load_test_landscape(self.landscape_file)
     self.events = {
         "start": 1502811001,
         "first_delete": 1502818001,
         "second_delete": 1502825001,
         "first_add": 1502828001
     }
Ejemplo n.º 3
0
    def setUp(self):
        self.identity = IDENTITY_ATTR.copy()
        self.state = STATE_ATTR.copy()
        manager = landscape_manager.LandscapeManager(utils.TEST_CONFIG_FILE)

        # Set the application landscape manager to the test manager.
        application.LANDSCAPE = manager

        # Prepare the database
        self.graph_db = manager.graph_db
        self.graph_db.delete_all()
        self.app = application.APP.test_client()
Ejemplo n.º 4
0
    def setUp(self):
        manager = landscape_manager.LandscapeManager(utils.TEST_CONFIG_FILE)

        self.graph_db = manager.graph_db
        self.graph_db.delete_all()
        self.graph_db.load_test_landscape(self.landscape_file)
Ejemplo n.º 5
0
 def setUp(self):
     self.landscape_mgr = landscape_manager.LandscapeManager()
     self.listener_1 = mock.Mock()
     self.listener_2 = mock.Mock()
     self.landscape_mgr.listeners = [self.listener_1, self.listener_2]
Ejemplo n.º 6
0
# Copyright (c) 2017, Intel Research and Development Ireland Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Module starts the landscaper.
"""
from landscaper import landscape_manager

if __name__ == '__main__':
    MANAGER = landscape_manager.LandscapeManager()
    MANAGER.start_landscaper()