File: test_update_policy.py

package info (click to toggle)
python-globus-sdk 4.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,144 kB
  • sloc: python: 35,242; sh: 37; makefile: 35
file content (34 lines) | stat: -rw-r--r-- 874 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
24
25
26
27
28
29
30
31
32
33
34
from __future__ import annotations

import pytest

from globus_sdk.testing import load_response


@pytest.mark.parametrize(
    "case_name",
    (
        "project_id_str",
        "project_id_uuid",
        "authentication_assurance_timeout",
        "required_mfa",
        "not_required_mfa",
        "display_name",
        "description",
        "no_domain_constrants_include",
        "empty_domain_constrants_include",
        "domain_constrants_include",
        "no_domain_constrants_exclude",
        "empty_domain_constrants_exclude",
        "domain_constrants_exclude",
    ),
)
def test_update_policy(
    service_client,
    case_name: str,
):
    meta = load_response(service_client.update_policy, case=case_name).metadata

    res = service_client.update_policy(**meta["args"])
    for k, v in meta["response"].items():
        assert res["policy"][k] == v