Esempio n. 1
0
    def setUp(self):
        # Mock Registry
        Registry.getConfig = MagicMock(return_value=None)

        # Load configuration defaults
        config = Config()
        config.defaults()

        self.server = NetServer(config)
        self.webserver = WebServer(self.server)
        self.restapi = self.webserver.restapi
Esempio n. 2
0
    def setUp(self):
        # Mock Registry
        Registry.getConfig = MagicMock(return_value=None)

        # Initialise Database object to create relationships
        db = Database()
        db.register()

        # Load configuration defaults
        config = Config()
        config.defaults()

        self.server = NetServer(config)
        self.webserver = WebServer(self.server)
        self.restapi = self.webserver.restapi