def set_architectures(self, architectures): """Configures the architectures used to build packages in the PPA.
Note that some architectures may only be available upon request
from Launchpad administrators. ppa.constants.ARCHES_PPA is a
list of standard architectures that don't require permissions.
:rtype: bool
:returns: True if architectures could be set, False on error.
"""
uri_base = "https://api.launchpad.net/devel/+processors/{}"
procs = [uri_base.format(arch) for arch in architectures]
try:
> self.archive.setProcessors(processors=procs)
E AttributeError: 'ArchiveMock' object has no attribute 'setProcessors'
ppa/ppa.py:197: AttributeError
============================================================================================= short test summary info =============================================================================================
FAILED tests/test_scripts_ppa.py::test_command_create - AttributeError: 'ArchiveMock' object has no attribute 'setProcessors'
On a side note, I am getting the following test failure:
_______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ ____ test_command_create _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ _______ ____
fake_config = {'ppa_name': 'testing', 'team_name': 'me', 'wait_seconds': 0.1}, monkeypatch = <_pytest. monkeypatch. MonkeyPatch object at 0x7f7aae4c5b90>
def test_command_ create( fake_config, monkeypatch):
monkeypatch. setattr( "sys.stdin" , io.StringIO('test description')) command_ create( lp, fake_config) == 0
lp = LpServiceMock()
> assert script.
tests/test_ scripts_ ppa.py: 370: ppa.set_ architectures( architectures)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scripts/ppa:483: in command_create
the_
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Ppa(ppa_ name='testing' , team_name='me'), architectures = ['amd64', 'arm64', 'armhf', 'i386', 'powerpc', 'ppc64el', ...]
def set_architectur es(self, architectures):
"""Configures the architectures used to build packages in the PPA.
Note that some architectures may only be available upon request ARCHES_ PPA is a
from Launchpad administrators. ppa.constants.
list of standard architectures that don't require permissions.
:rtype: bool /api.launchpad. net/devel/ +processors/{}" format( arch) for arch in architectures] setProcessors( processors= procs)
:returns: True if architectures could be set, False on error.
"""
uri_base = "https:/
procs = [uri_base.
try:
> self.archive.
E AttributeError: 'ArchiveMock' object has no attribute 'setProcessors'
ppa/ppa.py:197: AttributeError ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= == short test summary info ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= == scripts_ ppa.py: :test_command_ create - AttributeError: 'ArchiveMock' object has no attribute 'setProcessors'
=======
FAILED tests/test_