Skip to content

Commit

Permalink
Merge pull request Kuadrant#332 from averevki/black-reformat
Browse files Browse the repository at this point in the history
Apply black changes from new version
  • Loading branch information
pehala authored Jan 29, 2024
2 parents 6677a27 + f1e4655 commit 67d1a24
Show file tree
Hide file tree
Showing 121 changed files with 121 additions and 0 deletions.
1 change: 1 addition & 0 deletions testsuite/certificates.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing classes for working with TLS certificates"""

import dataclasses
import datetime
import json
Expand Down
1 change: 1 addition & 0 deletions testsuite/config/tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Dynaconf loader for fetching data from tools namespace"""

import logging

logger = logging.getLogger(__name__)
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Classes related to Gateways"""

import enum
from abc import ABC, abstractmethod
from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/envoy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Envoy Gateway module"""

import time
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/envoy/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Envoy Config"""

import yaml

from testsuite.openshift.httpbin import Httpbin
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/envoy/route.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""GatewayRoute implementation for pure Envoy Deployment"""

import typing

from testsuite.gateway import Gateway, GatewayRoute
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/envoy/tls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Envoy Gateway implementation with TLS setup"""

from typing import TYPE_CHECKING

import yaml
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/envoy/wristband.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Wristband Envoy"""

import yaml

from testsuite.gateway.envoy import Envoy, EnvoyConfig
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/gateway_api/gateway.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing all gateway classes"""

# mypy: disable-error-code="override"
import json
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions testsuite/gateway/gateway_api/hostname.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing implementation for Hostname related classes of Gateway API"""

from httpx import Client

from testsuite.certificates import Certificate
Expand Down
1 change: 1 addition & 0 deletions testsuite/httpx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common classes for Httpx"""

# I change return type of HTTPX client to Kuadrant Result
# mypy: disable-error-code="override, return-value"
from tempfile import NamedTemporaryFile
Expand Down
1 change: 1 addition & 0 deletions testsuite/httpx/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Auth Classes for HttpX"""

from functools import cached_property
from typing import Generator, Callable, Union

Expand Down
1 change: 1 addition & 0 deletions testsuite/hyperfoil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing facade for hyperfoil manipulation"""

import shutil
import typing
from io import StringIO
Expand Down
1 change: 1 addition & 0 deletions testsuite/lifecycle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Classes related to lifecycle management"""

import abc


Expand Down
1 change: 1 addition & 0 deletions testsuite/mockserver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for Mockserver integration"""

from typing import Union

import httpx
Expand Down
1 change: 1 addition & 0 deletions testsuite/oidc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common classes for OIDC provider"""

from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Callable, Tuple
Expand Down
1 change: 1 addition & 0 deletions testsuite/oidc/auth0.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing all classes necessary to work with Auth0"""

from functools import cached_property

import httpx
Expand Down
1 change: 1 addition & 0 deletions testsuite/oidc/rhsso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Objects for RHSSO"""

from functools import cached_property
from urllib.parse import urlparse

Expand Down
1 change: 1 addition & 0 deletions testsuite/oidc/rhsso/objects.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Object wrappers of RHSSO resources"""

from functools import cached_property
from typing import List

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""OpenShift common objects"""

import functools
from dataclasses import dataclass, field
from typing import Optional, Literal
Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/api_key.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""API Key Secret CR object"""

import base64
from functools import cached_property

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/authorino.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Authorino CR object"""

import abc
from typing import Any, Dict, List

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/config_map.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config map"""

from testsuite.openshift import OpenShiftObject


Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/deployment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Deployment related objects"""

from dataclasses import dataclass
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/httpbin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Httpbin related classes"""

from functools import cached_property

from testsuite.lifecycle import LifecycleObject
Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/ingress.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Kubernetes Ingress object"""

from typing import Any, Dict, List, Optional, TYPE_CHECKING

from testsuite.openshift import OpenShiftObject
Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Package implements objects to work with metrics from Prometheus client for OpenShift"""

from .prometheus import Prometheus, Metrics
from .service_monitor import ServiceMonitor, MetricsEndpoint

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/metrics/prometheus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Simple client for the OpenShift metrics"""

from typing import Callable
from datetime import datetime

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/metrics/service_monitor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module implements Service Monitor CR for OpenShift"""

from dataclasses import dataclass

from testsuite.utils import asdict
Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/route.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing Route related stuff"""

from functools import cached_property

from httpx import Client
Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/secret.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing Secret related classes"""

import base64
from typing import Literal

Expand Down
1 change: 1 addition & 0 deletions testsuite/openshift/service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Service related objects"""

from dataclasses import dataclass, asdict

from testsuite.openshift import OpenShiftObject
Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/authorization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Authorization related objects"""

import abc
from dataclasses import dataclass
from typing import Literal, Optional
Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/authorization/auth_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""AuthConfig object"""

from functools import cached_property
from typing import Dict

Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/authorization/auth_policy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing classes related to AuthPolicy"""

from typing import Dict, TYPE_CHECKING

from testsuite.utils import asdict
Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/authorization/sections.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sections inside of AuthConfig"""

from typing import Literal, Iterable, TYPE_CHECKING, Union

from testsuite.policy.authorization import (
Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/dns_policy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for DNSPolicy related classes"""

from dataclasses import dataclass
from typing import Optional, Literal

Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/rate_limit_policy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""RateLimitPolicy related objects"""

from dataclasses import dataclass
from time import sleep
from typing import Iterable, Literal, Optional, List
Expand Down
1 change: 1 addition & 0 deletions testsuite/policy/tls_policy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for TLSPolicy related classes"""

from testsuite.gateway import Referencable
from testsuite.openshift.client import OpenShiftClient
from testsuite.openshift import OpenShiftObject
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Root conftest"""

import signal
from urllib.parse import urlparse

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Conftest for OPA policy located on external registry"""

import pytest

from testsuite.utils import rego_allow_header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Tests for Open Policy Agent (OPA) policy pulled from external registry.
Registry is represented by Mockserver Expectation that returns Rego query.
"""

import time

import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Open Policy Agent (OPA) Rego policies"""

import pytest

from testsuite.utils import rego_allow_header
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests metadata caching"""

from time import sleep

import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for metadata without caching feature"""

import pytest

from testsuite.utils import extract_response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test condition to skip the authorization section of AuthConfig"""

import pytest

from testsuite.policy.authorization import Pattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test condition to skip the identity section of AuthConfig"""

import pytest

from testsuite.policy.authorization import Pattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test condition to skip the metadata section of AuthConfig"""

import pytest

from testsuite.policy.authorization import Pattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test condition to skip the response section of AuthConfig"""

import pytest

from testsuite.policy.authorization import Pattern, Value, JsonResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test patterns reference functionality and All/Any logical expressions."""

import pytest

from testsuite.policy.authorization import Pattern, PatternRef, AnyPattern, AllPattern
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test condition to skip the entire AuthConfig"""

import pytest

from testsuite.policy.authorization import Pattern
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/kuadrant/authorino/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Conftest for Authorino tests"""

import pytest

from testsuite.httpx.auth import HttpxOidcClientAuth
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/kuadrant/authorino/dinosaur/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Conftest for dinosaur test
"""

import pytest

from testsuite.httpx.auth import HttpxOidcClientAuth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for anonymous identity context"""

import pytest

from testsuite.utils import extract_response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for anonymous identity"""

import pytest


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Conftest for authorino API key identity"""

import pytest

from testsuite.httpx.auth import HeaderApiKeyAuth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for API key identity context"""

import pytest

from testsuite.utils import extract_response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test for API key auth credentials"""

import pytest

from testsuite.policy.authorization import Credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Using K8 notation for API key Secret label selector - selector.matchExpressions
https://pkg.go.dev/k8s.io/[email protected]/pkg/apis/meta/v1#LabelSelector
"""

import pytest

from testsuite.openshift import Selector, MatchExpression
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests identity verification & authentication with API keys. Using selector.matchLabels"""

import pytest


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests Secret reconciliation for API key identity verification & authentication"""

import pytest

from testsuite.httpx.auth import HeaderApiKeyAuth
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests basic authentication with RHSSO/Auth0 as identity provider"""

import pytest

from testsuite.httpx.auth import HttpxOidcClientAuth
Expand Down
1 change: 1 addition & 0 deletions testsuite/tests/kuadrant/authorino/identity/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Conftest for all Identity tests"""

import pytest


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Basic tests for extended properties"""

import pytest

from testsuite.policy.authorization import Value, ValueFrom
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""https://github.com/Kuadrant/authorino/pull/399"""

import pytest

from testsuite.policy.authorization import Value
Expand Down
Loading

0 comments on commit 67d1a24

Please sign in to comment.