Esempio n. 1
0
    def test_load_local_settings_file_connecstring(self):

        with tempfile.TemporaryDirectory() as tempdir:
            path = os.path.sep.join([tempdir, "local_settings.json"])
            with open(path, 'w') as f:
                json.dump(self.local_settings, f)

            cl = Crosslevel()
            cl.load_local_settings(path)
            self.assertEqual(self.local_settings['connectstring'],
                             cl.connectstring)
Esempio n. 2
0
    def test_fetch_data_is_df(self):
        with tempfile.TemporaryDirectory() as tempdir:
            path_settings = os.path.sep.join([tempdir, "local_settings.json"])
            path_runfile = os.path.sep.join([tempdir, "runfile.json"])
            with open(path_settings, 'w') as f:
                json.dump(self.local_settings, f)
            with open(path_runfile, 'w') as f:
                json.dump(self.run_db, f)

            cl = Crosslevel()
            cl.load_local_settings(path_settings)
            cl.load_runfile(path_runfile)

        cl.fetch_data()