def test_build_spark():
    session = MagicMock()
    session.kind = Constants.session_kind_spark
    factory = LivyClientFactory()
    client = factory.build_client(session)
    assert isinstance(client, PandasScalaLivyClient)
def test_can_build_all_clients():
    factory = LivyClientFactory()
    for kind in Constants.session_kinds_supported:
        session = MagicMock()
        session.kind = kind
        factory.build_client(session)
def test_build_unknown_language():
    session = MagicMock()
    session.kind = "unknown"
    factory = LivyClientFactory()
    factory.build_client(session)
Ejemplo n.º 4
0
def test_can_build_all_clients():
    session = MagicMock()
    factory = LivyClientFactory()
    for language in Constants.lang_supported:
        factory.build_client(language, session)