'simulate a nested dynamic include:
playbook.yml:
- hosts: localhost
roles:
- { role: \'testrole\' }
testrole/tasks/main.yml:
- include: "include1.yml"
static: no
testrole/tasks/include1.yml:
- include: include2.yml
static: no
testrole/tasks/include2.yml:
- debug: msg="blah"'

@patch('ansible.parsing.dataloader.unfrackpath', mock_unfrackpath_noop)
@patch.object(DataLoader, '_is_role')
def test_path_dwim_relative(self, mock_is_role):

    mock_is_role.return_value = False
    with patch('os.path.exists') as mock_os_path_exists:
        mock_os_path_exists.return_value = False
        self._loader.path_dwim_relative('/tmp/roles/testrole/tasks', 'tasks', 'included2.yml')
        called_args = [os.path.normpath(to_text(call[0][0])) for call in mock_os_path_exists.call_args_list]
        self.assertIn('/tmp/roles/testrole/tasks/included2.yml', called_args)
        self.assertIn('/tmp/roles/testrole/tasks/tasks/included2.yml', called_args)
        self.assertIn('tasks/included2.yml', called_args)
        self.assertIn('included2.yml', called_args)
