New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make yubikey tests run with Python 3 #1424

Merged
merged 1 commit into from Feb 7, 2019

Conversation

Projects
None yet
2 participants
@plettich
Copy link
Contributor

plettich commented Feb 4, 2019

  • create a b64encode_and_unicode() function to automatically convert the
    result of a b64encode() call to a unicode string
  • update crc checksum calculation to work with Python 2 and 3

Working on #676

Make yubikey tests run with Python 3
- create a `b64encode_and_unicode()` function to automatically convert the
  result of a `b64encode()` call to a unicode string
- update crc checksum calculation to work with Python 2 and 3

@plettich plettich requested a review from privacyidea/core Feb 4, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Feb 4, 2019

Codecov Report

Merging #1424 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1424      +/-   ##
=========================================
+ Coverage   96.77%   96.8%   +0.02%     
=========================================
  Files         144     144              
  Lines       17183   17184       +1     
=========================================
+ Hits        16629   16635       +6     
+ Misses        554     549       -5
Impacted Files Coverage Δ
privacyidea/lib/tokens/yubikeytoken.py 97.61% <100%> (ø) ⬆️
privacyidea/lib/utils.py 96.85% <100%> (ø) ⬆️
privacyidea/lib/tokens/u2f.py 95.83% <0%> (+4.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40d6cc9...95cca41. Read the comment docs.

@cornelinux
Copy link
Member

cornelinux left a comment

Looks good to me. But we should add a test case for stability in the future.

:type msg: bytes
:return: crc16 checksum of msg
:rtype: int
"""

This comment has been minimized.

@cornelinux

cornelinux Feb 5, 2019

Member

I think it might be a good idea to add an additional test case in test_lib_utils.py.
Well, we should have had a test case for checksum earlier, but now it looks like we should! ;-)

This comment has been minimized.

@plettich

plettich Feb 5, 2019

Author Contributor

I was going to update the test_lib_utils.py and the lib/utils.py anyway.

@cornelinux cornelinux merged commit 617c253 into master Feb 7, 2019

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.77%)
Details
codecov/project 96.8% (+0.02%) compared to 40d6cc9
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@cornelinux cornelinux deleted the python3_update_yubi_tests branch Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment