Skip to content

Commit 461e8ed

Browse files
SK-2270: fix the unit tests
1 parent 595d4dc commit 461e8ed

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/vault/controller/test__detect.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,11 @@ def test_deidentify_file_using_file_path(self, mock_open, mock_basename, mock_ba
656656
# Setup processed response
657657
processed_response = Mock()
658658
processed_response.status = "SUCCESS"
659-
processed_response.output = []
659+
processed_response.output = [
660+
Mock(processedFile="dGVzdCBjb250ZW",
661+
processedFileType="txt",
662+
processedFileExtension="txt")
663+
]
660664
processed_response.wordCharacterCount = Mock(wordCount=1, characterCount=1)
661665

662666
# Test the method
@@ -682,10 +686,9 @@ def test_deidentify_file_using_file_path(self, mock_open, mock_basename, mock_ba
682686
result = self.detect.deidentify_file(req)
683687

684688
mock_file.read.assert_called_once()
685-
mock_basename.assert_called_with("/path/to/test.txt")
686-
687689
mock_validate.assert_called_once()
688690
files_api.deidentify_text.assert_called_once()
691+
mock_basename.assert_called_with("/path/to/test.txt")
689692
mock_poll.assert_called_once()
690693
mock_parse.assert_called_once()
691694

0 commit comments

Comments
 (0)