Exemple #1
0
 def _make_entry(self, message):
     entry = gob_helper.GitLogEntry(
         'abcdef', ['123456'],
         'Author',
         '*****@*****.**',
         'Committer',
         '*****@*****.**',
         '2005-05-05 05:05:05.000000000',
         '2010-10-10 10:10:10.000000000',
         message,
         branch='refs/heads/branch',
         repo_url='https://example.googlesource.com/foo')
     entry.add_path('modify', 'modified/file', None)
     entry.add_path('add', 'added/file', None)
     entry.add_path('delete', 'gone', 'deleted/file')
     return entry
import tempfile
import unittest

from infra.services.bugdroid import gerrit_poller
from infra.services.bugdroid import gob_helper
from infra.services.bugdroid import poller_handlers

from infra_libs import ts_mon
import infra_libs

LOG_ENTRY_1 = gob_helper.GitLogEntry(
    'abcdef', [],
    'Author 1',
    '*****@*****.**',
    'Committer 1',
    '*****@*****.**',
    '2005-05-05 05:05:05.000000000',
    '2010-10-10 10:10:10.000000000',
    'Message 1',
    branch='refs/heads/branch',
    repo_url='https://example.googlesource.com/foo')
LOG_ENTRY_1.update_date = '2005-05-05 05:05:05.000000000'
LOG_ENTRY_1.number = 42

LOG_ENTRY_2 = gob_helper.GitLogEntry(
    '123456', ['abcdef'],
    'Author 2',
    '*****@*****.**',
    'Committer 2',
    '*****@*****.**',
    '2006-06-06 06:06:06.000000000',