Skip to content

Commit

Permalink
Update: unit test master_data_management
Browse files Browse the repository at this point in the history
  • Loading branch information
KarineGEO6 committed Jun 26, 2024
1 parent b1a7a67 commit 9353f31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"id":"ajqxm3v"
}
15 changes: 15 additions & 0 deletions tests/test_unit_master_data_management_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,18 @@ def test_get_season_fields(self, get_response):
response = self.service.get_season_fields(sfids)
assert len(response) == 20

@patch('geosyspy.utils.http_client.HttpClient.get')
def test_get_profile(self, get_response):
get_response.return_value = mock_http_response_text_content('GET', load_data_from_textfile(
"master_data_management_post_profile_mock_http_response"), status_code=201)

response = self.service.get_profile()
assert response.status_code == 200

@patch('geosyspy.utils.http_client.HttpClient.get')
def test_get_profile(self, get_response):
get_response.return_value = mock_http_response_text_content('GET', load_data_from_textfile(
"master_data_management_post_profile_mock_http_response"), status_code=201)

response = self.service.get_profile("")
assert response.status_code == 200

0 comments on commit 9353f31

Please sign in to comment.