def test_should_load_data_from_file(self, pickle_mock):
with patch('builtins.open', mock_open()) as file_mock:
load('dir/filename/')
file_mock.assert_called_with('dir/filename/', 'rb')
pickle_mock.load.assert_called_with(file_mock())
评论列表
文章目录