File: test_authenticator.py

package info (click to toggle)
python-ibm-cloud-sdk-core 3.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 944 kB
  • sloc: python: 5,750; makefile: 40; xml: 7; sh: 7
file content (23 lines) | stat: -rw-r--r-- 688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# coding=utf-8
# pylint: disable=missing-docstring

from requests import Request
from ibm_cloud_sdk_core.authenticators import Authenticator


class TestAuthenticator(Authenticator):
    """A test of the Authenticator base class"""

    def validate(self) -> None:
        """Simulated validate() method."""

    def authenticate(self, req: Request) -> None:
        """Simulated authenticate() method."""


def test_authenticator():
    authenticator = TestAuthenticator()
    assert authenticator is not None
    assert authenticator.authentication_type() == Authenticator.AUTHTYPE_UNKNOWN
    assert authenticator.validate() is None
    assert authenticator.authenticate(None) is None