File: test_no_auth_authenticator.py

package info (click to toggle)
python-ibm-cloud-sdk-core 3.19.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 672 kB
  • sloc: python: 4,428; makefile: 26; sh: 25
file content (15 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# pylint: disable=missing-docstring

from ibm_cloud_sdk_core.authenticators import NoAuthAuthenticator, Authenticator


def test_no_auth_authenticator():
    authenticator = NoAuthAuthenticator()
    assert authenticator is not None
    assert authenticator.authentication_type() == Authenticator.AUTHTYPE_NOAUTH

    authenticator.validate()

    request = {'headers': {}}
    authenticator.authenticate(request)
    assert not request['headers']