Commit e041b42c authored by Ritika Kaushal's avatar Ritika Kaushal
Browse files

added a test case

parent b8fc45be
Pipeline #108207 failed with stages
in 2 minutes and 48 seconds
......@@ -85,7 +85,6 @@ class TestOsduClient:
respx_mock.post(f"{base_url}/api/os-wellbore-ddms/ddms/v3/wellbores").mock(side_effect=self.match_and_mock_post)
# client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -103,7 +102,6 @@ class TestOsduClient:
mock_response = httpx.Response(400)
respx_mock.post(f"{base_url}/api/os-wellbore-ddms/ddms/v3/wellbores").mock(return_value=mock_response)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -122,7 +120,6 @@ class TestOsduClient:
respx_mock.post(f"{base_url}/api/os-wellbore-ddms/ddms/v3/welllogs").mock(side_effect=self.match_and_mock_post)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
response = client.post_welllog(record)
......@@ -139,8 +136,7 @@ class TestOsduClient:
mock_response = httpx.Response(500)
respx_mock.post(f"{base_url}/api/os-wellbore-ddms/ddms/v3/welllogs").mock(return_value=mock_response)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
client = OsduClient(self.mockConfig, self._access_token)
# Act
with pytest.raises(DataLoaderWebResponseError) as ex:
client.post_welllog(record)
......@@ -161,7 +157,6 @@ class TestOsduClient:
mock_response = httpx.Response(500)
respx_mock.post(url).mock(return_value=mock_response)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
with pytest.raises(DataLoaderWebResponseError) as ex:
......@@ -182,7 +177,6 @@ class TestOsduClient:
respx_mock.post(url).mock(side_effect=self.match_and_mock_post_with_content_header)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -200,7 +194,6 @@ class TestOsduClient:
respx_mock.get(url).mock(side_effect=self.match_and_mock_get)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -216,7 +209,6 @@ class TestOsduClient:
mock_response = httpx.Response(500)
respx_mock.get(url).mock(return_value=mock_response)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -236,7 +228,6 @@ class TestOsduClient:
respx_mock.get(url).mock(side_effect=self.match_and_mock_get)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -252,8 +243,7 @@ class TestOsduClient:
mock_response = httpx.Response(500)
respx_mock.get(url).mock(return_value=mock_response)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
client = OsduClient(self.mockConfig, self._access_token)
# Act
with pytest.raises(DataLoaderWebResponseError) as ex:
......@@ -275,7 +265,6 @@ class TestOsduClient:
respx_mock.get(url).mock(side_effect=self.match_and_mock_get_return_bytes)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -295,7 +284,6 @@ class TestOsduClient:
respx_mock.get(url).mock(side_effect=self.match_and_mock_get_return_bytes)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -311,7 +299,6 @@ class TestOsduClient:
respx_mock.post(url).mock(side_effect=self.match_and_mock_post)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......@@ -327,7 +314,6 @@ class TestOsduClient:
respx_mock.post(url).mock(side_effect=self.match_and_mock_post)
#client = OsduClient(base_url, self._access_token, self._data_partition_id)
client = OsduClient(self.mockConfig, self._access_token)
# Act
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment