Skip to content

Commit

Permalink
feat uservices: enable isort
Browse files Browse the repository at this point in the history
commit_hash:a832b2c470b935073c9fb2369787a3e1e6b6ddf2
  • Loading branch information
serjflint committed Sep 13, 2024
1 parent bd39429 commit 9f4a409
Show file tree
Hide file tree
Showing 89 changed files with 22 additions and 92 deletions.
1 change: 0 additions & 1 deletion chaotic/bin/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from chaotic.main import main


if __name__ == '__main__':
main()
1 change: 0 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from conan.tools.files import copy
from conan.tools.files import load


required_conan_version = '>=1.51.0, <2.0.0' # pylint: disable=invalid-name


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import pytest
from pytest_userver import chaos


logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest


MULTIPLE_CHUNKS_BODY_SIZE = 1000000


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pytest
from pytest_userver import chaos


logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import pytest
from pytest_userver import chaos


logger = logging.getLogger(__name__)
sys_random = random.SystemRandom()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import pytest


SUCCESS_IPV4 = '77.88.55.55:0'
SUCCESS_IPV6 = '[2a02:6b8:a::a]:0'
SUCCESS_RESOLVE = f'{SUCCESS_IPV6}, {SUCCESS_IPV4}'
Expand Down
1 change: 0 additions & 1 deletion core/functional_tests/tracing/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest


pytest_plugins = ['pytest_userver.plugins.core']

USERVER_CONFIG_HOOKS = ['config_echo_url']
Expand Down
1 change: 0 additions & 1 deletion core/functional_tests/uctl/tests/test_uctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import pytest


try:
import yatest.common.runtime

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import grpc
import pytest
from pytest_userver import chaos
import samples.greeter_pb2_grpc as greeter_pb2_grpc # noqa: E402, E501

from service import GreeterService

import samples.greeter_pb2_grpc as greeter_pb2_grpc # noqa: E402, E501

logger = logging.getLogger(__name__)

pytest_plugins = ['pytest_userver.plugins.grpc']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import pytest
from pytest_userver import chaos
import samples.greeter_pb2_grpc as greeter_pb2_grpc # noqa: E402, E501

import samples.greeter_pb2_grpc as greeter_pb2_grpc # noqa: E402, E501

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import grpc
import pytest

import samples.greeter_pb2 as greeter_pb2 # noqa: E402, E501

logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import grpc
import pytest
import samples.greeter_pb2 as greeter_pb2 # noqa: E402, E501

import requests_server

import samples.greeter_pb2 as greeter_pb2 # noqa: E402, E501


@pytest.mark.parametrize('case', requests_server.ALL_CASES)
async def test_basic(grpc_client, gate, case):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server

DATA_PARTS_MAX_SIZE = 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server

DATA_PARTS_MAX_SIZE = 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

import requests_server

DATA_PARTS_MAX_SIZE = 40
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pathlib

import pytest

import samples.greeter_pb2_grpc as greeter_services # noqa: E402, E501

pytest_plugins = ['pytest_userver.plugins.grpc']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from samples import greeter_pb2


HEADERS_TO_PROPAGATE = ['custom-header-1', 'custom-header-2']
HEADERS_NOT_TO_PROPAGATE = [
'custom-header-1-non-prop',
Expand Down
1 change: 1 addition & 0 deletions grpc/functional_tests/metrics/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

import samples.greeter_pb2_grpc as greeter_services # noqa: E402, E501

pytest_plugins = ['pytest_userver.plugins.grpc']
Expand Down
1 change: 1 addition & 0 deletions grpc/functional_tests/metrics/tests/test_metrics.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import typing

import pytest

import samples.greeter_pb2 as greeter_protos # noqa: E402, E501


Expand Down
1 change: 1 addition & 0 deletions grpc/functional_tests/middleware_server/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

import samples.greeter_pb2_grpc as greeter_services # noqa: E402, E501

pytest_plugins = ['pytest_userver.plugins.grpc']
Expand Down
1 change: 0 additions & 1 deletion grpc/handlers/functional_tests/health/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import healthchecking.healthchecking_pb2_grpc as healthchecking_pb2_grpc
import pytest


pytest_plugins = ['pytest_userver.plugins.grpc']

USERVER_CONFIG_HOOKS = ['prepare_service_config']
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os


CONSUME_BASE_ROUTE = '/consume'
CONSUMERS = ['kafka-consumer-first', 'kafka-consumer-second']
TOPIC = 'test-topic'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
import logging
import os


import common
from confluent_kafka import Producer
import pytest


import common


pytest_plugins = ['pytest_userver.plugins.core']


Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import logging


import pytest


from common import CONSUMERS
from common import get_consumed_messages
from common import parse_message_keys
from common import start_consumers
from common import stop_consumers
from common import TOPIC
import pytest


async def test_partitions_share(service_client, testpoint, kafka_producer):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging


from common import CONSUMERS
from common import get_consumed_messages
from common import make_non_faulty
Expand All @@ -9,7 +8,6 @@
from common import stop_consumers
from common import TOPIC


MESSAGE_TO_FAIL = 'please-start-failing'


Expand Down
2 changes: 0 additions & 2 deletions kafka/functional_tests/integrational_tests/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
import logging
import os


import confluent_kafka
import pytest


pytest_plugins = ['pytest_userver.plugins.core']


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from common import generate_messages_to_consume

from utils import consume
from utils import consume_topic_messages
from utils import make_producer_request_body
from utils import produce
from utils import produce_batch


TOPIC1 = 'test-topic-consume-produced-1'
TOPIC2 = 'test-topic-consume-produced-2'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from common import generate_messages_to_consume

from utils import consume
from utils import consume_topic_messages


TOPIC1 = 'test-topic-consume-1'
TOPIC2 = 'test-topic-consume-2'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
from typing import Awaitable


from utils import clear_topics
from utils import make_producer_request_body
from utils import produce
from utils import produce_async
from utils import produce_batch


TOPIC = 'test-topic-send'


Expand Down
1 change: 0 additions & 1 deletion kafka/functional_tests/integrational_tests/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
from typing import Awaitable


CONSUME_BASE_ROUTE = '/consume'
PRODUCE_ROUTE = '/produce'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest


pytest_plugins = ['pytest_userver.plugins.mongo']

MONGO_COLLECTIONS = {
Expand Down
1 change: 0 additions & 1 deletion mongo/functional_tests/basic_chaos/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from testsuite.databases.mongo import connection


pytest_plugins = ['pytest_userver.plugins.mongo']

MONGO_COLLECTIONS = {
Expand Down
1 change: 0 additions & 1 deletion mongo/functional_tests/basic_chaos/tests/test_mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from pytest_userver import chaos


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion mongo/functional_tests/metrics/tests-values/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest


pytest_plugins = ['pytest_userver.plugins.mongo']

MONGO_COLLECTIONS = {
Expand Down
1 change: 0 additions & 1 deletion mongo/functional_tests/metrics/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest


_BASE_TIME_SEC = 100
_RECENT_PERIOD_WAIT_INTERVAL_SEC = 6
_DEFAULT_NOW = datetime.datetime.utcfromtimestamp(_BASE_TIME_SEC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import utils


PORTAL_URL = '/chaos/postgres?type=portal'
PORTAL_SMALL_TIMEOUT_URL = '/chaos/postgres?type=portal-small-timeout'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import utils


SELECT_URL = '/chaos/postgres?type=select'
SELECT_SMALL_TIMEOUT_URL = '/chaos/postgres?type=select-small-timeout'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import utils


DATA_TRANSMISSION_DELAY = 1
BYTES_PER_SECOND_LIMIT = 10
CONNECTION_TIME_LIMIT = 0.4
Expand Down
1 change: 0 additions & 1 deletion postgresql/functional_tests/connlimit_max/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from testsuite.databases.pgsql import discover


pytest_plugins = ['pytest_userver.plugins.postgresql']


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pytest


TESTSUITE_MAX_CONNECTIONS = 100 - 5
STATIC_MAX_CONNECTIONS = 15

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import taxi.integration_testing as it


pytest_plugins = [
'testsuite.pytest_plugin',
'pytest_userver.plugins.caches',
Expand Down
Loading

0 comments on commit 9f4a409

Please sign in to comment.