Exemplo n.º 1
0
def test_onlyhostset_none(mocker):
    mocker.patch.dict(os.environ,{'DATABRICKS_HOST':'host'})
    mocker.patch.dict(os.environ,{'DATABRICKS_TOKEN':''})

    config = auth.get_auth_config()
    # Assert
    assert config == None
Exemplo n.º 2
0
def test_tokenhostset_okay(mocker):
    mocker.patch.dict(os.environ,{'DATABRICKS_HOST':'host'})
    mocker.patch.dict(os.environ,{'DATABRICKS_TOKEN':'token'})

    config = auth.get_auth_config()
    # Assert
    assert config != None
    assert config.host == 'host'
    assert config.token == 'token'