```
ubuntutools/test/test_archive.py::LocalSourcePackageTestCase::test_pull
/usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method LocalSourcePackageTestCase.test_pull of <ubuntutools.test.test_archive.LocalSourcePackageTestCase testMethod=test_pull>>)
return self.run(*args, **kwds)
```
`test_pull` does not need to be run directly. Make it private.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
pylint complains about C0209: Formatting a regular string which could be
a f-string (consider-using-f-string)
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Commit ae74f71a1e9d4be043162b19d23f2d44c964c771 removed the pylint unit
test saying that unit tests are not needed to just run flake8 or pylint.
Since pylint is useful, add it back, but this time call it directly and
not embed it into a unit test.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Assumptions were made about the implementation by mocking
that are no longer true, and the tests generally need to be
fixed to be more robust about testing
This test class performs 'local source package' tests, but a missing
local dsc file won't perform any local test, it will query the LP server.
The test attempted to narrowly mock out specific network access to
emulate a 'missing' package by trying to return 404 when the url from
SourcePackage._lp_url() is opened, but now that _lp_url() is removed,
a missing local dsc file will result in full querying of the LP api,
which is not as easily mocked.
Change dsc verification to fail only if the public key was available, but
signature verification failed. If no public key is available for the dsc,
print warning only. (LP: #1700846)
Also add pull-* parameter --no-verify-signature to manually prevent failure
when signature verification fails.
instead of a function that calls the system program rmadison, use
a fully-functional class to interface with the madison api, as well
as the debian snapshot api
verify it can parse/load DSC when created
throw PackageNotFoundException from lp_spph if can't find package
update test case expected order of url processing
instead of debian.debian_support.Version, use ubuntutools version,
which extends it and adds the strip_epoch() function which is
needed to convert full version string to version used in filenames