def test_too_quick_close2(self): # https://github.com/ansible/ansible/issues/20977 datafile = 'tests/fixtures/needs_info/3_noclose.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEqual(facts['needs_info_action'], 'warn')
def test_too_quick_close(self): # https://github.com/ansible/ansible/issues/37518 datafile = u'tests/fixtures/needs_info/2_noclose.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEquals(facts[u'needs_info_action'], None)
def test_too_quick_close2(self): # https://github.com/ansible/ansible/issues/20977 datafile = u'tests/fixtures/needs_info/3_noclose.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEquals(facts[u'needs_info_action'], u'warn')
def test_warn_template(self): datafile = 'tests/fixtures/needs_info/0_warn_template.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEqual(facts['needs_info_action'], 'warn')
def test_close_1(self): datafile = 'tests/fixtures/needs_info/1_close.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEqual(facts['needs_info_action'], 'close')
def test_no_action(self): datafile = u'tests/fixtures/needs_info/0_no_action.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEquals(facts[u'needs_info_action'], None)
def test_close_1(self): datafile = u'tests/fixtures/needs_info/1_close.yml' with get_issue(datafile, self.statusfile) as iw: facts = needs_info.needs_info_timeout_facts(iw, self.meta) self.assertEquals(facts[u'needs_info_action'], u'close')