def test_build_session_with_defaults(): factory = LivyClientFactory() connection_string = get_connection_string("url", "user", "pass") language = "python" session = factory.create_session(language, connection_string) assert session.language == language assert session.id == "-1" assert session.started_sql_context is False
def test_build_session(): factory = LivyClientFactory() connection_string = get_connection_string("url", "user", "pass") kind = Constants.session_kind_pyspark properties = {"kind": kind} ipython_display = MagicMock() session = factory.create_session(ipython_display, connection_string, properties, "1", True) assert session.kind == kind assert session.id == "1" assert session.started_sql_context assert session.properties == properties