コード例 #1
0
ファイル: conftest.py プロジェクト: anandhkishan/libmozevent
def mock_mc(tmpdir):
    """
    Mock a Mozilla Central repository
    """
    config = {
        "name": "mozilla-central",
        "ssh_user": "******",
        "ssh_key": "privateSSHkey",
        "url": "http://mozilla-central",
        "try_url": "http://mozilla-central/try",
        "batch_size": 100,
    }
    repo = Repository(config, tmpdir.realpath())
    repo.repo = build_repository(tmpdir, "mozilla-central")
    repo.clone = MagicMock(side_effect=asyncio.coroutine(lambda: True))
    return repo
コード例 #2
0
ファイル: conftest.py プロジェクト: anandhkishan/libmozevent
def mock_nss(tmpdir):
    """
    Mock an NSS repository
    """
    config = {
        "name": "nss",
        "ssh_user": "******",
        "ssh_key": "privateSSHkey",
        "url": "http://nss",
        "try_url": "http://nss/try",
        "try_mode": "syntax",
        "try_syntax": "-a -b XXX -c YYY",
        "batch_size": 100,
    }
    repo = Repository(config, tmpdir.realpath())
    repo.repo = build_repository(tmpdir, "nss")
    repo.clone = MagicMock(side_effect=asyncio.coroutine(lambda: True))
    return repo