Git Product home page Git Product logo

handcash-connect-sdk-python's People

Contributors

krzysiekfonal avatar rafa-js avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

handcash-connect-sdk-python's Issues

Error when running unittest. FAILED (failures=1, errors=3)

I ran python3 -m unittest

Location of where I ran the test
/Users/rachael/github/handcash-connect-sdk-python

Received FAILED (failures=1, errors=3)

Below is the full output of the test.

.EEF.E....
======================================================================
ERROR: test_get_encryption_keypair (handcash_connect_sdk.tests.integration.test_profile.TestProfile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 49, in _handle_http_request
    response.raise_for_status()
  File "/Users/rachael/github/handcash-connect-sdk-python/.venv/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://cloud.handcash.io/v1/connect/profile/encryptionKeypair

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/tests/integration/test_profile.py", line 34, in test_get_encryption_keypair
    keypair = self.profile.get_encryption_keypair()
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/profile.py", line 31, in get_encryption_keypair
    encryption_keypair = self._handcash_connect_service.get_encryption_keypair(public_key.to_hex())
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 26, in get_encryption_keypair
    return self._handle_http_request(
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 54, in _handle_http_request
    raise HandCashConnectApiError(exc.response.status_code, message=response['message'], info=response['info'])
handcash_connect_sdk.api.handcash_connect_api_error.HandCashConnectApiError: 401

======================================================================
ERROR: test_get_friends (handcash_connect_sdk.tests.integration.test_profile.TestProfile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 49, in _handle_http_request
    response.raise_for_status()
  File "/Users/rachael/github/handcash-connect-sdk-python/.venv/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://cloud.handcash.io/v1/connect/profile/friends

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/tests/integration/test_profile.py", line 25, in test_get_friends
    user_profiles = self.profile.get_friends()
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/profile.py", line 23, in get_friends
    user_profile in self._handcash_connect_service.get_user_friends()["items"]]
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 30, in get_user_friends
    return self._handle_http_request(
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 54, in _handle_http_request
    raise HandCashConnectApiError(exc.response.status_code, message=response['message'], info=response['info'])
handcash_connect_sdk.api.handcash_connect_api_error.HandCashConnectApiError: 401

======================================================================
ERROR: test_get_payment (handcash_connect_sdk.tests.integration.test_wallet.TestWallet)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 49, in _handle_http_request
    response.raise_for_status()
  File "/Users/rachael/github/handcash-connect-sdk-python/.venv/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://cloud.handcash.io/v1/connect/wallet/payment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/tests/integration/test_wallet.py", line 50, in test_get_payment
    payment_result = self.wallet.get_payment(transaction_id)
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/wallet.py", line 18, in get_payment
    return PaymentResult(**self._handcash_connect_service.get_payment(transaction_id))
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 42, in get_payment
    return self._handle_http_request(
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/api/handcash_connect_service.py", line 54, in _handle_http_request
    raise HandCashConnectApiError(exc.response.status_code, message=response['message'], info=response['info'])
KeyError: 'info'

======================================================================
FAIL: test_get_permissions (handcash_connect_sdk.tests.integration.test_profile.TestProfile)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rachael/github/handcash-connect-sdk-python/handcash_connect_sdk/tests/integration/test_profile.py", line 31, in test_get_permissions
    self.assertListEqual(expected, sorted(permissions))
AssertionError: Lists differ: ['DECRYPT', 'FRIENDS', 'PAY', 'USER_PRIVATE_PROFILE', 'USER_PUBLIC_PROFILE'] != ['PAY', 'SIGN_DATA', 'USER_PRIVATE_PROFILE', 'USER_PUBLIC_PROFILE']

First differing element 0:
'DECRYPT'
'PAY'

First list contains 1 additional elements.
First extra element 4:
'USER_PUBLIC_PROFILE'

- ['DECRYPT', 'FRIENDS', 'PAY', 'USER_PRIVATE_PROFILE', 'USER_PUBLIC_PROFILE']
?  ----------------------

+ ['PAY', 'SIGN_DATA', 'USER_PRIVATE_PROFILE', 'USER_PUBLIC_PROFILE']
?        +++++++++++++


----------------------------------------------------------------------
Ran 10 tests in 5.482s

FAILED (failures=1, errors=3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.