forked from capless/python-jose-cryptodome
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from friedcell/extendable
Easier extending/replacing of key algorithms
- Loading branch information
Showing
4 changed files
with
74 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
from jose.jwk import Key | ||
|
||
# from jose.jwk import Key | ||
# from jose.exceptions import JOSEError | ||
import pytest | ||
|
||
# import pytest | ||
|
||
@pytest.fixture | ||
def alg(): | ||
return Key("key", "ALG") | ||
|
||
# @pytest.fixture | ||
# def alg(): | ||
# return Key() | ||
|
||
class TestBaseAlgorithm: | ||
|
||
# class TestBaseAlgorithm: | ||
def test_sign_is_interface(self, alg): | ||
with pytest.raises(NotImplementedError): | ||
alg.sign('msg') | ||
|
||
# def test_prepare_key_is_interface(self, alg): | ||
# with pytest.raises(JOSEError): | ||
# alg.prepare_key('secret') | ||
def test_verify_is_interface(self, alg): | ||
with pytest.raises(NotImplementedError): | ||
alg.verify('msg', 'sig') | ||
|
||
# def test_sign_is_interface(self, alg): | ||
# with pytest.raises(JOSEError): | ||
# alg.sign('msg', 'secret') | ||
|
||
# def test_verify_is_interface(self, alg): | ||
# with pytest.raises(JOSEError): | ||
# alg.verify('msg', 'secret', 'sig') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters