Tests: patch the address lookup where core now keeps it (postulo.plugins.public_addresses), before repinning past d9013ff7f #4
Labels
No labels
bug
documentation
enhancement
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-apprise#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
postulo/postulo#248 (
d9013ff7fon core'smain) moved the address checks out ofpostulo.plugins.fetchinginto a new leaf module,postulo.plugins.public_addresses. The private_addresses_formoved with them and is deliberately not re-exported, because a patch on a re-export silently misses.tests/test_apprise.py:62, in thecompose_networkfixture, does:This is harmless while the core pin is
1d6cdd7e0, which still has the name. Once the pin moves pastd9013ff7f, the fixture raisesAttributeErrorat setup. The two tests that use it then error rather than silently pass: the one at line 170 (the container next door) and the one at line 183 (a name that resolves nowhere).Fix, in the commit that moves the pin
Either:
from postulo.plugins import public_addresses, registryin place offetching, registry(line 9, wherefetchingis used nowhere else), andmonkeypatch.setattr(public_addresses, "_addresses_for", addresses).socket.getaddrinfoinstead, raisingsocket.gaierrorfor the names the test treats as unknown.Found by an independent review of #248, which checked every
postulo.*import and patch target in the plugin repositories. This is the only one affected.