Skip to content

test_oauth.OAuthTestRsaSha1Case throws errors with PyCryptodome #210

Open
@neirbowj

Description

@neirbowj

When the Crypto package dependency is met with PyCryptodome instead of PyCrypto, rauth.oauth.RsaSha1Signature raises AttributeError because the internal implementation details differ in Crypto.PublicKey.RSA.

======================================================================
======================================================================
ERROR: test_rsasha1_badargument (test_oauth.OAuthTestRsaSha1Case)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/neirbowj/src/github/rauth/tests/test_oauth.py", line 214, in test_rsasha1_badargument
    self.req_kwargs)
  File "/usr/local/lib/python2.7/unittest/case.py", line 473, in assertRaises
    callableObj(*args, **kwargs)
  File "/home/neirbowj/src/github/rauth/rauth/oauth.py", line 211, in sign
    if not isinstance(consumer_secret, self.RSA._RSAobj):
AttributeError: 'module' object has no attribute '_RSAobj'

======================================================================
ERROR: test_rsasha1_signature (test_oauth.OAuthTestRsaSha1Case)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/neirbowj/src/github/rauth/tests/test_oauth.py", line 199, in test_rsasha1_signature
    self.req_kwargs)
  File "/home/neirbowj/src/github/rauth/rauth/oauth.py", line 211, in sign
    if not isinstance(consumer_secret, self.RSA._RSAobj):
AttributeError: 'module' object has no attribute '_RSAobj'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions