Closed vitodb closed 11 months ago
All modified lines are covered by tests :white_check_mark:
Comparison is base (
e917838
) 47.23% compared to head (deb03fe
) 47.23%. Report is 6 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Unit test
test_refresh_entry_token
is failing with log detailsin this collapsible section.
``` =================================== FAILURES =================================== ___________________________ test_refresh_entry_token ___________________________ [gw3] linux -- Python 3.9.16 /usr/bin/python3 def test_refresh_entry_token(): with tempfile.TemporaryDirectory() as work_dir: os.mkdir(os.path.join(work_dir, "passwords.d")) with open(os.path.join(work_dir, "passwords.d", "FRONTEND"), "wb") as fd: fd.write(token_util.derive_master_key(b"TEST")) create_and_sign_token = token_util.create_and_sign_token with mock.patch.object(token_util, "create_and_sign_token") as create_token: create_token.side_effect = lambda *args, **kwargs: create_and_sign_token( *args, **kwargs, issuer="fermicloud000.fnal.gov:0000" ) gfe = glide_frontend_element.get_gfe_obj("CMS", "CMS", FRONTEND_CFG, structlog.getLogger("test")) token = gfe.refresh_entry_token("test_entry", work_dir) > assert token E AssertionError: assert '' create_and_sign_token =where it is highlighted the missing
encode
attribute forjwt
module. Indeed this attribute is available in thePyJWT
implementation of jwt. Checking in pypi.org, jwt has not been updated in about 2 years, so it doesn't seem to be actively maintained, while PyJWT got updates about two months ago.Running unit test interactively the test_refresh_entry_token test is OK.