Esempio n. 1
0
    def setUp(self):
        catsnap.Client()._engine = db_info['engine']
        catsnap.Client().session().commit = catsnap.Client().session().flush

        app.config['TESTING'] = True
        app.secret_key = str('super sekrit')
        self.app = app.test_client()
Esempio n. 2
0
    def setUp(self):
        (creds_fd, creds) = tempfile.mkstemp()
        self.creds_tempfile = creds
        self.creds_temp_fd = creds_fd
        (config_fd, config) = tempfile.mkstemp()
        self.config_tempfile = config
        self.config_temp_fd = config_fd
        catsnap.config.file_config._input = MagicMock()
        catsnap.config.file_config.CONFIG_FILE = config
        catsnap.config.file_config.LEGACY_CREDENTIALS_FILE = creds

        catsnap.config.argument_config.sys = MagicMock()

        catsnap.config.file_config.getpass = MagicMock()

        catsnap.Client()._engine = db_info['engine']
        catsnap.Client().session().commit = catsnap.Client().session().flush

        app.config['TESTING'] = True
        app.secret_key = str('super sekrit')
        self.app = app.test_client()