Giter Site home page Giter Site logo

Comments (2)

hiranya911 avatar hiranya911 commented on May 23, 2024
========================================================================================= FAILURES ==========================================================================================
_____________________________________________________________________________________ test_custom_token _____________________________________________________________________________________

api_key = 'AIzaSyC2oKOCYaYhczl3axh4U5lZeIyt6-2Ii1Q'

    def test_custom_token(api_key):
        custom_token = auth.create_custom_token('user1')
>       id_token = _sign_in(custom_token, api_key)

integration/test_auth.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
integration/test_auth.py:27: in _sign_in
    resp = requests.request('post', _id_toolkit_url, params=params, json=body)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/api.py:58: in request
    return session.request(method=method, url=url, **kwargs)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/sessions.py:488: in request
    prep = self.prepare_request(req)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/sessions.py:431: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/models.py:308: in prepare
    self.prepare_body(data, files, json)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/models.py:458: in prepare_body
    body = complexjson.dumps(json)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/__init__.py:230: in dumps
    return _default_encoder.encode(obj)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:199: in encode
    chunks = self.iterencode(o, _one_shot=True)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:257: in iterencode
    return _iterencode(o, 0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <json.encoder.JSONEncoder object at 0x7fdf91a52470>
o = b'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIjhkMTRkNjZiZGJiODdjYzk3Y2YzOTlmZDUwOWYyNWZlNTk2N2MwZTkiLCAidHlwIjogIkpXVCJ9.eyJleHA...tQsYqx8_ZTlZDUC7nHfp4DBOaSmR7VL7JNXyN6kPNG2x43FYIlAlnunhwDCFSkNyhgo2_q9toJafB4WjnMinonllQ8qI3-f8AX7EXRrYxdsiet1RwAtw=='

    def default(self, o):
        """Implement this method in a subclass such that it returns
            a serializable object for ``o``, or calls the base implementation
            (to raise a ``TypeError``).
    
            For example, to support arbitrary iterators, you could
            implement default like this::
    
                def default(self, o):
                    try:
                        iterable = iter(o)
                    except TypeError:
                        pass
                    else:
                        return list(iterable)
                    # Let the base class default method raise the TypeError
                    return JSONEncoder.default(self, o)
    
            """
>       raise TypeError(repr(o) + " is not JSON serializable")
E       TypeError: b'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIjhkMTRkNjZiZGJiODdjYzk3Y2YzOTlmZDUwOWYyNWZlNTk2N2MwZTkiLCAidHlwIjogIkpXVCJ9.eyJleHAiOiAxNDk5NDcxNTI2LCAidWlkIjogInVzZXIxIiwgImlzcyI6ICJmaXJlYmFzZS1hZG1pbnNkay1qa2I0Y0BhZG1pbi1qYXZhLWludGVncmF0aW9uLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwgInN1YiI6ICJmaXJlYmFzZS1hZG1pbnNkay1qa2I0Y0BhZG1pbi1qYXZhLWludGVncmF0aW9uLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwgImlhdCI6IDE0OTk0Njc5MjYsICJhdWQiOiAiaHR0cHM6Ly9pZGVudGl0eXRvb2xraXQuZ29vZ2xlYXBpcy5jb20vZ29vZ2xlLmlkZW50aXR5LmlkZW50aXR5dG9vbGtpdC52MS5JZGVudGl0eVRvb2xraXQifQ==.r1LTrprH1xnPXdou8rQhqNI64PvbU2dtV2sgl3WBuBIvwGp6lrMj6-7nRSBceJaZ91dWY2EkpQqFRITXi9Ii0OFPKk2ljkUTAV2PTvMwncAcdp4akIyZLIsMeygxD2uqk-jVvT2iCLVBtXYl-y9d3M6zpLCIpfgfRgIu_gX_OJr7EEqUUXueS6IzeHvovMJv-Ca5owyuLUns4aWbxLzF09Q8htFiE2WAIptQsYqx8_ZTlZDUC7nHfp4DBOaSmR7VL7JNXyN6kPNG2x43FYIlAlnunhwDCFSkNyhgo2_q9toJafB4WjnMinonllQ8qI3-f8AX7EXRrYxdsiet1RwAtw==' is not JSON serializable

../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:180: TypeError
_______________________________________________________________________________ test_custom_token_with_claims _______________________________________________________________________________

api_key = 'AIzaSyC2oKOCYaYhczl3axh4U5lZeIyt6-2Ii1Q'

    def test_custom_token_with_claims(api_key):
        dev_claims = {'premium' : True, 'subscription' : 'silver'}
        custom_token = auth.create_custom_token('user2', dev_claims)
>       id_token = _sign_in(custom_token, api_key)

integration/test_auth.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
integration/test_auth.py:27: in _sign_in
    resp = requests.request('post', _id_toolkit_url, params=params, json=body)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/api.py:58: in request
    return session.request(method=method, url=url, **kwargs)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/sessions.py:488: in request
    prep = self.prepare_request(req)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/sessions.py:431: in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/models.py:308: in prepare
    self.prepare_body(data, files, json)
../../../.pyenv/versions/3.5.0/lib/python3.5/site-packages/requests/models.py:458: in prepare_body
    body = complexjson.dumps(json)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/__init__.py:230: in dumps
    return _default_encoder.encode(obj)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:199: in encode
    chunks = self.iterencode(o, _one_shot=True)
../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:257: in iterencode
    return _iterencode(o, 0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <json.encoder.JSONEncoder object at 0x7fdf91a52470>
o = b'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIjhkMTRkNjZiZGJiODdjYzk3Y2YzOTlmZDUwOWYyNWZlNTk2N2MwZTkiLCAidHlwIjogIkpXVCJ9.eyJleHA...cnGyEzT1IPAy6L9npuomrOiryZhil1L5Skmmkj6KyNoHdwngU3HlwE-qxqoR4yCd3s8C_Jbkq25LN353Cfeovsyj_mwMvOsmvSN4vCuWspl8EAUPs2Xw=='

    def default(self, o):
        """Implement this method in a subclass such that it returns
            a serializable object for ``o``, or calls the base implementation
            (to raise a ``TypeError``).
    
            For example, to support arbitrary iterators, you could
            implement default like this::
    
                def default(self, o):
                    try:
                        iterable = iter(o)
                    except TypeError:
                        pass
                    else:
                        return list(iterable)
                    # Let the base class default method raise the TypeError
                    return JSONEncoder.default(self, o)
    
            """
>       raise TypeError(repr(o) + " is not JSON serializable")
E       TypeError: b'eyJhbGciOiAiUlMyNTYiLCAia2lkIjogIjhkMTRkNjZiZGJiODdjYzk3Y2YzOTlmZDUwOWYyNWZlNTk2N2MwZTkiLCAidHlwIjogIkpXVCJ9.eyJleHAiOiAxNDk5NDcxNTI2LCAidWlkIjogInVzZXIyIiwgImlzcyI6ICJmaXJlYmFzZS1hZG1pbnNkay1qa2I0Y0BhZG1pbi1qYXZhLWludGVncmF0aW9uLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwgInN1YiI6ICJmaXJlYmFzZS1hZG1pbnNkay1qa2I0Y0BhZG1pbi1qYXZhLWludGVncmF0aW9uLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwgImNsYWltcyI6IHsic3Vic2NyaXB0aW9uIjogInNpbHZlciIsICJwcmVtaXVtIjogdHJ1ZX0sICJpYXQiOiAxNDk5NDY3OTI2LCAiYXVkIjogImh0dHBzOi8vaWRlbnRpdHl0b29sa2l0Lmdvb2dsZWFwaXMuY29tL2dvb2dsZS5pZGVudGl0eS5pZGVudGl0eXRvb2xraXQudjEuSWRlbnRpdHlUb29sa2l0In0=.jmsbXzeqmASDQE8aUNiwLqzygjURpIEXGRxl_0Dvz1sxzS3IxXTW_yyYHPZ7B3YgVw-gt0W9azwbXEKjOaqOP8jAlFJ-IuQqwR9yKqg5OWJyewDHzORFIvR5GtMlRJcZOoWS_nCaB0wymzKzexB6-tZunlhwo0-LIT3zfbi60FnlrtjSxNSU_xUP6lO5pjtgBpIchUqNeop5qPrAxrO-IsRo9HZZIuPSnxcnGyEzT1IPAy6L9npuomrOiryZhil1L5Skmmkj6KyNoHdwngU3HlwE-qxqoR4yCd3s8C_Jbkq25LN353Cfeovsyj_mwMvOsmvSN4vCuWspl8EAUPs2Xw==' is not JSON serializable

../../../.pyenv/versions/3.5.0/lib/python3.5/json/encoder.py:180: TypeError
=========================================================================== 2 failed, 34 passed in 12.65 seconds ============================================================================

from firebase-admin-python.

hiranya911 avatar hiranya911 commented on May 23, 2024

Fixed

from firebase-admin-python.

Related Issues (20)

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.