Skip to content

Commit

Permalink
Bug Fixes (#623)
Browse files Browse the repository at this point in the history
* Added OpenSTEF packages

Signed-off-by: rodalynbarce <Rodalyn.Barce@shell.com>

* Update connector tests

Signed-off-by: rodalynbarce <Rodalyn.Barce@shell.com>

---------

Signed-off-by: rodalynbarce <Rodalyn.Barce@shell.com>
  • Loading branch information
rodalynbarce authored Jan 2, 2024
1 parent 8fffdaf commit f210e48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"googleapis-common-protos>=1.56.4",
"langchain==0.0.291",
"openai==0.27.8",
"openstef-dbc==3.6.17",
"sqlparams==5.1.0",
"entsoe-py==0.5.10",
]

PYSPARK_PACKAGES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_connection_cursor_fails(spark_session: SparkSession, mocker: MockerFixt
mocked_connection = SparkConnection(spark=spark_session)

with pytest.raises(Exception):
assert mocked_connection.cursor()
mocked_connection.cursor()


def test_cursor_execute_fails(spark_session: SparkSession, mocker: MockerFixture):
Expand All @@ -94,7 +94,7 @@ def test_cursor_execute_fails(spark_session: SparkSession, mocker: MockerFixture
mocked_cursor = SparkCursor(SparkConnection(spark=spark_session).connection)

with pytest.raises(Exception):
assert mocked_cursor.execute("test")
mocked_cursor.execute("test")


def test_cursor_fetch_all_fails(spark_session: SparkSession, mocker: MockerFixture):
Expand All @@ -103,7 +103,7 @@ def test_cursor_fetch_all_fails(spark_session: SparkSession, mocker: MockerFixtu
mocked_cursor = SparkCursor(SparkConnection(spark=spark_session).connection)

with pytest.raises(Exception):
assert mocked_cursor.fetch_all()
mocked_cursor.fetch_all()


def test_cursor_close_fails(spark_session: SparkSession, mocker: MockerFixture):
Expand All @@ -112,4 +112,4 @@ def test_cursor_close_fails(spark_session: SparkSession, mocker: MockerFixture):
mocked_cursor = SparkCursor(SparkConnection(spark=spark_session).connection)

with pytest.raises(Exception):
assert mocked_cursor.close()
mocked_cursor.close()
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def test_connection_cursor_fails(mocker: MockerFixture):
)

with pytest.raises(Exception):
assert mocked_connection.cursor()
mocked_connection.cursor()


def test_cursor_execute_fails(mocker: MockerFixture):
Expand All @@ -237,7 +237,7 @@ def test_cursor_execute_fails(mocker: MockerFixture):
)

with pytest.raises(Exception):
assert mocked_cursor.execute("test")
mocked_cursor.execute("test")


def test_cursor_fetch_all_fails(mocker: MockerFixture):
Expand All @@ -263,7 +263,7 @@ def test_cursor_fetch_all_fails(mocker: MockerFixture):
)

with pytest.raises(Exception):
assert mocked_cursor.fetch_all()
mocked_cursor.fetch_all()


def test_cursor_close_fails(mocker: MockerFixture):
Expand All @@ -287,4 +287,4 @@ def test_cursor_close_fails(mocker: MockerFixture):
)

with pytest.raises(Exception):
assert mocked_cursor.close()
mocked_cursor.close()

0 comments on commit f210e48

Please sign in to comment.