File: test_users.py

package info (click to toggle)
auth0-python 4.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,280 kB
  • sloc: python: 8,933; makefile: 15; sh: 2
file content (17 lines) | stat: -rw-r--r-- 433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import unittest
from unittest import mock

from ...authentication.users import Users


class TestUsers(unittest.TestCase):
    @mock.patch("auth0.rest.RestClient.get")
    def test_userinfo(self, mock_get):
        u = Users("my.domain.com")

        u.userinfo(access_token="atk")

        mock_get.assert_called_with(
            url="https://my.domain.com/userinfo",
            headers={"Authorization": "Bearer atk"},
        )