Python3.5 setup fails with invalid ssl cert while fetching pip ( Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:728) - skipping)
Added workaround for it as mentioned on this thread https://github.com/actions/setup-python/issues/866
This pr also addresses some of the unit tests failing on python3.5 due to assert_called_once attribute not found error and same thing, we saw it in container as well
mock_stream.assert_called_once()
File "/usr/lib/python3.5/unittest/mock.py", line 583, in __getattr__
raise AttributeError(name)
AttributeError: assert_called_once
[ ] There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[ ] If applicable, the PR references the bug/issue that it fixes in the description.
[ ] New Unit tests were added for the changes made
Description
Python3.5 setup fails with invalid ssl cert while fetching pip ( Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:728) - skipping) Added workaround for it as mentioned on this thread https://github.com/actions/setup-python/issues/866
This pr also addresses some of the unit tests failing on python3.5 due to assert_called_once attribute not found error and same thing, we saw it in container as well
I found out that assert_called_once is not available before < 3.6 and using this will produce unexpected behavior. It seems we should avoid using as per this https://web.archive.org/web/20210919045841/http://engineroom.trackmaven.com/blog/mocking-mistakes/
https://web.archive.org/web/20211009193419/https://docs.python.org/3.5/library/unittest.mock.html https://stackoverflow.com/questions/42297549/magic-mock-assert-called-once-vs-assert-called-once-with-weird-behaviour
Issue #
PR information
Quality of Code and Contribution Guidelines