Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/mocks/phabricator.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# | # | ||||
# Copyright (c) 2019-2020 The Bitcoin ABC developers | # Copyright (c) 2019-2020 The Bitcoin ABC developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
import mock | import mock | ||||
from phabricator_wrapper import PhabWrapper | from phabricator_wrapper import PhabWrapper | ||||
class Result: | class Result: | ||||
def __init__(self, data=[]): | def __init__(self, data: list): | ||||
self.data = data | self.data = data | ||||
def instance(): | def instance(): | ||||
phab = None | phab = None | ||||
phab = PhabWrapper(host="https://phabricator.test") | phab = PhabWrapper(host="https://phabricator.test") | ||||
phab.logger = mock.Mock() | phab.logger = mock.Mock() | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |