示例#1
0
def test_connection_from_config():
    """Test loading a connection from config file."""
    tmpdir = Path(tempfile.mktemp())
    d = tmpdir / "test_stub"
    d.mkdir(parents=True)
    input_file_path = d / "input_file.csv"
    output_file_path = d / "input_file.csv"
    stub_con = StubConnection.from_config(
        public_key="pk",
        connection_configuration=ConnectionConfig(
            input_file=input_file_path, output_file=output_file_path))
    assert not stub_con.connection_status.is_connected
    shutil.rmtree(tmpdir, ignore_errors=True)
示例#2
0
 def test_connection_from_config(self):
     """Test loading a connection from config file."""
     stub_con = StubConnection.from_config(
         public_key="pk", connection_configuration=ConnectionConfig())
     assert not stub_con.connection_status.is_connected