Skip to content

Commit

Permalink
Issue #1088
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 14, 2024
1 parent 0dc65dd commit 7e1bfe5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions sde_collections/tests/api_tests.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# docker-compose -f local.yml run --rm django pytest sde_collections/tests/api_tests.py
import unittest
from unittest.mock import Mock, patch

from requests import HTTPError

from ..sinequa_api import Api


class TestApi(unittest.TestCase):
def setUp(self):
# Set up an instance of the Api class with parameters for testing
Expand Down Expand Up @@ -69,8 +66,7 @@ def test_query(self, mock_post):
"advanced": {"collection": "/SDE/sample_folder/"},
},
}

mock_post.assert_called_once_with(expected_url, headers=None, json=expected_payload, data=None, verify=False)
mock_post.assert_called_once_with(expected_url, headers={}, json=expected_payload, verify=False)

@patch("requests.post")
def test_sql_query(self, mock_post):
Expand Down Expand Up @@ -133,6 +129,5 @@ def test_process_full_text_response(self):
]
self.assertEqual(processed_response, expected)


if __name__ == "__main__":
unittest.main()

0 comments on commit 7e1bfe5

Please sign in to comment.