|
|
@ -236,7 +236,7 @@ class T(unittest.TestCase):
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
# Set a base state
|
|
|
|
# Set a base state
|
|
|
|
pol.state = previous_state
|
|
|
|
pol.state = previous_state
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
# Assert that we were looking for the right package as per
|
|
|
|
# Assert that we were looking for the right package as per
|
|
|
|
# FakeSourceData contents
|
|
|
|
# FakeSourceData contents
|
|
|
@ -307,7 +307,7 @@ class T(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
excuse = FakeExcuseRunning
|
|
|
|
excuse = FakeExcuseRunning
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
@ -328,7 +328,7 @@ class T(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
excuse = FakeExcusePass
|
|
|
|
excuse = FakeExcusePass
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
@ -348,7 +348,7 @@ class T(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
excuse = FakeExcuseHinted
|
|
|
|
excuse = FakeExcuseHinted
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
@ -378,7 +378,7 @@ class T(unittest.TestCase):
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
# Set a base state
|
|
|
|
# Set a base state
|
|
|
|
pol.state = previous_state
|
|
|
|
pol.state = previous_state
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
@ -405,7 +405,7 @@ class T(unittest.TestCase):
|
|
|
|
# - better to have an explicit test case for it.
|
|
|
|
# - better to have an explicit test case for it.
|
|
|
|
excuse = FakeExcuseVerdictOverriden
|
|
|
|
excuse = FakeExcuseVerdictOverriden
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
pol = SRUADTRegressionPolicy(options, {})
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
bugs_from_changes.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
|
lp.assert_not_called()
|
|
|
@ -493,7 +493,7 @@ class T(unittest.TestCase):
|
|
|
|
pol = SRUADTRegressionPolicy(options, {}, dry_run=True)
|
|
|
|
pol = SRUADTRegressionPolicy(options, {}, dry_run=True)
|
|
|
|
# Set a base state
|
|
|
|
# Set a base state
|
|
|
|
pol.state = previous_state
|
|
|
|
pol.state = previous_state
|
|
|
|
status = pol.apply_policy_impl(excuse.policy_info, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
status = pol.apply_policy_impl(None, None, 'testpackage', None, FakeSourceData, excuse)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
self.assertEqual(status, PolicyVerdict.PASS)
|
|
|
|
# Assert that we were looking for the right package as per
|
|
|
|
# Assert that we were looking for the right package as per
|
|
|
|
# FakeSourceData contents
|
|
|
|
# FakeSourceData contents
|
|
|
|