diff options
| author | Alex Schofield <git@ajschof.me> | 2024-08-28 11:19:53 +0100 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2024-08-28 11:19:53 +0100 |
| commit | b94cbcb355ad2bde408e5e714252d06621cbbc8e (patch) | |
| tree | cba93a5d70db5f61c2906a35188b7afd683a2950 | |
| parent | d4c20088cdfc602faec21bd55df703a41dc0a343 (diff) | |
| download | de-project-bentley-b94cbcb355ad2bde408e5e714252d06621cbbc8e.tar.gz de-project-bentley-b94cbcb355ad2bde408e5e714252d06621cbbc8e.zip | |
test: add staticmethod decorator to methods
| -rw-r--r-- | tests/test_load_lambda.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_load_lambda.py b/tests/test_load_lambda.py index 02fd461..25a176d 100644 --- a/tests/test_load_lambda.py +++ b/tests/test_load_lambda.py @@ -38,7 +38,8 @@ def mock_sm_client(): class TestLambdaHandler: - def test_lambda_handler_returns_200_and_table_name_if_uploaded(self, mocker): + @staticmethod + def test_lambda_handler_returns_200_and_table_name_if_uploaded(mocker): mocker.patch( "src.load_lambda.upload_dfs_to_database", return_value={"uploaded": ["table_one", "table_two"], "not_uploaded": []}, @@ -48,7 +49,8 @@ class TestLambdaHandler: assert "table_one" in result["body"] assert "table_two" in result["body"] - def test_lambda_handler_returns_200_and_table_name_if_not_uploaded(self, mocker): + @staticmethod + def test_lambda_handler_returns_200_and_table_name_if_not_uploaded(mocker): mocker.patch( "src.load_lambda.upload_dfs_to_database", return_value={"uploaded": [], "not_uploaded": ["table_one"]}, @@ -57,7 +59,8 @@ class TestLambdaHandler: assert result["statusCode"] == 200 assert "No dataframes were uploaded" in result["body"] - def test_lambda_handler_returns_error_if_both_lists_empty(self, mocker): + @staticmethod + def test_lambda_handler_returns_error_if_both_lists_empty(mocker): mocker.patch( "src.load_lambda.upload_dfs_to_database", return_value={"uploaded": [], "not_uploaded": []}, |
