Skip to content

Commit

Permalink
fix line endings OS differences in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonvt committed Feb 4, 2025
1 parent 3045572 commit ac989ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tests_unit/test_api/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def test_upload(self, cognite_client, mock_file_upload_response, httpx_mock):
assert FileMetadata.load(mock_file_upload_response) == res
assert "https://upload.here" == str(httpx_mock.get_requests()[1].url)
assert {"name": "bla", "directory": directory} == jsgz_load(httpx_mock.get_requests()[0].content)
assert b"content1\n" == httpx_mock.get_requests()[1].content
assert f"content1{os.linesep}".encode() == httpx_mock.get_requests()[1].content

def test_upload_with_external_id(self, cognite_client, mock_file_upload_response):
path = os.path.join(os.path.dirname(__file__), "files_for_test_upload", "file_for_test_upload_1.txt")
Expand Down Expand Up @@ -612,7 +612,7 @@ def test_upload_using_file_handle(self, cognite_client, mock_file_upload_respons
assert FileMetadata.load(mock_file_upload_response) == res
assert "https://upload.here" == httpx_mock.get_requests()[1].url
assert {"name": "bla"} == jsgz_load(httpx_mock.get_requests()[0].content)
assert b"content1\n" == httpx_mock.get_requests()[1].content
assert f"content1{os.linesep}".encode() == httpx_mock.get_requests()[1].content

def test_upload_path_does_not_exist(self, cognite_client):
with pytest.raises(ValueError, match="does not exist"):
Expand Down

0 comments on commit ac989ae

Please sign in to comment.