Merge "fix unit test:test_execute_audit_with_interval_no_job"
This commit is contained in:
commit
2be5bd1c3f
@ -385,11 +385,10 @@ class TestContinuousAuditHandler(base.DbTestCase):
|
||||
audit_handler = continuous.ContinuousAuditHandler()
|
||||
self.audits[0].next_run_time = (datetime.datetime.now() -
|
||||
datetime.timedelta(seconds=1800))
|
||||
m_is_inactive.return_value = False
|
||||
m_get_jobs.return_value = None
|
||||
m_is_inactive.return_value = True
|
||||
m_get_jobs.return_value = []
|
||||
|
||||
audit_handler.execute_audit(self.audits[0], self.context)
|
||||
m_execute.assert_called_once_with(self.audits[0], self.context)
|
||||
self.assertIsNotNone(self.audits[0].next_run_time)
|
||||
|
||||
@mock.patch.object(objects.service.Service, 'list')
|
||||
|
Loading…
Reference in New Issue
Block a user