Code review comment for ppa-dev-tools:add_repository_module

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

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):
        lp = LpServiceMock()
        monkeypatch.setattr("sys.stdin", io.StringIO('test description'))
> assert script.command_create(lp, fake_config) == 0

tests/test_scripts_ppa.py:370:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
scripts/ppa:483: in command_create
    the_ppa.set_architectures(architectures)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = Ppa(ppa_name='testing', team_name='me'), architectures = ['amd64', 'arm64', 'armhf', 'i386', 'powerpc', 'ppc64el', ...]

    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'

« Back to merge proposal