def METHOD_NAME(self, mock_date_time):
    start = datetime.utcnow()
    end = start + timedelta(minutes=5)
    mock_date_time.side_effect = [start, end]
    scanner_index_id = scanner.init_scanner_index(
        self.session, self.inv_index_id1)
    scanner.mark_scanner_index_complete(
        self.session, scanner_index_id, ['KeVersionScanner'],
        ['IamPolicyScanner', 'IapScanner'])
    db_row = (self.session.query(scanner_dao.ScannerIndex)
              .filter(scanner_dao.ScannerIndex.id == scanner_index_id).one())
    self.assertEqual(IndexState.PARTIAL_SUCCESS, db_row.scanner_status)
    self.assertEqual(
        'Scanner(s) with errors: IamPolicyScanner, IapScanner',
        db_row.scanner_index_errors)
    self.assertEqual(end, db_row.completed_at_datetime)