'Test that does not reindex anything when --all key is given and cancelled'

def test_given_all_key_prompts_and_reindexes_all_libraries_cancelled(self):

    with mock.patch(self.YESNO_PATCH_LOCATION) as patched_yes_no:
        patched_yes_no.return_value = False
        with mock.patch(self.REINDEX_PATH_LOCATION) as patched_index:
            with mock.patch(self.MODULESTORE_PATCH_LOCATION, mock.Mock(return_value=self.store)):
                call_command('reindex_library', all=True)
                patched_yes_no.assert_called_once_with(ReindexCommand.CONFIRMATION_PROMPT, default='no')
                patched_index.assert_not_called()
