def test_with_items_result(self): """The result of a with_items task.""" self.assertTrue( process.is_ansible_task_result( ansible_results([{ 'item': 'a', 'stdout': 'a' }, { 'item': 'b', 'stdout': 'b' }])))
def test_ansible_result(self): """A single Ansible result.""" self.assertTrue(process.is_ansible_task_result(ansible_result('a')))
def test_skipped(self): """The result of a skipped task.""" self.assertTrue( process.is_ansible_task_result({process.SKIPPED: True}))
def test_malformed_dict(self): """A dictionary with the wrong contents.""" self.assertFalse(process.is_ansible_task_result({'a': 'b'}))
def test_not_dict(self): """A value that is not a dictionary.""" self.assertFalse(process.is_ansible_task_result('foo'))