Skip to content

Commit 2503090

Browse files
authored
Fix test_adl for azure-datalake-store 1.0.1+ compatibility (#866)
The azure-datalake-store library removed the 'auth' attribute from the lib module in version 1.0.1. Add create=True to patch.object to allow mocking the attribute even when it doesn't exist in the module.
1 parent 8d8d155 commit 2503090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

papermill/tests/test_adl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_write_opens_file_and_writes_to_it(self):
5050
self.adl.write("hello world", "adl://foo_store.azuredatalakestore.net/path/to/file")
5151
self.fakeFile.write.assert_called_once_with(b"hello world")
5252

53-
@patch.object(adl_lib, 'auth', return_value="my_token")
53+
@patch.object(adl_lib, 'auth', return_value="my_token", create=True)
5454
@patch.object(adl_core, 'AzureDLFileSystem', return_value="my_adapter")
5555
def test_create_adapter(self, azure_dl_filesystem_mock, auth_mock):
5656
sut = ADL()

0 commit comments

Comments
 (0)