repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
TinkoffCreditSystems/overhave | tests/objects.py | <reponame>TinkoffCreditSystems/overhave
from functools import cache
from pathlib import Path
from typing import Dict, List, NamedTuple, NewType, Sequence
from unittest import mock
from pydantic import root_validator
from pydantic.main import BaseModel
from sqlalchemy import MetaData
from sqlalchemy.engine import Engin... |
TinkoffCreditSystems/overhave | overhave/admin/views/feature.py | <reponame>TinkoffCreditSystems/overhave<filename>overhave/admin/views/feature.py<gh_stars>10-100
import json
import logging
import re
from functools import cached_property
from pathlib import Path
from typing import Any, Dict, List, Optional
import flask
import werkzeug
from flask_admin import expose
from flask_admin.... |
TinkoffCreditSystems/overhave | tests/integration/conftest.py | import pytest
from overhave.storage import SystemUserGroupStorage, SystemUserStorage
@pytest.fixture(scope="package")
def test_system_user_storage() -> SystemUserStorage:
return SystemUserStorage()
@pytest.fixture(scope="package")
def test_system_user_group_storage() -> SystemUserGroupStorage:
return Syste... |
TinkoffCreditSystems/overhave | overhave/publication/gitlab/settings.py | <reponame>TinkoffCreditSystems/overhave
from typing import List
from overhave.entities import FeatureTypeName
from overhave.publication.settings import BaseGitPublisherSettings
from overhave.transport.http.gitlab_client import GitlabRepository
class NotSpecifiedFeatureTypeError(RuntimeError):
""" Exception for n... |
TinkoffCreditSystems/overhave | overhave/storage/scenario_storage.py | import abc
from typing import Optional, cast
from overhave import db
from overhave.entities import ScenarioModel
class BaseScenarioStorageException(Exception):
""" Base exception for :class:`ScenarioStorage`. """
class ScenarioNotExistsError(BaseScenarioStorageException):
""" Exception for situation withou... |
TinkoffCreditSystems/overhave | tests/unit/testing/test_plugin_utils.py | from typing import Optional
import pytest
from _pytest.nodes import Item
from pytest_bdd.parser import Scenario, Step
from overhave.pytest_plugin import get_scenario, has_issue_links
from overhave.pytest_plugin.helpers import (
add_issue_links_to_report,
add_scenario_title_to_report,
get_full_step_name,
... |
TinkoffCreditSystems/overhave | demo/steps/feature_type_3/then_steps.py | <filename>demo/steps/feature_type_3/then_steps.py<gh_stars>10-100
from pytest_bdd import then
from demo.steps.parser import step_with_args
@then(step_with_args("бот говорит {phrase:Str}"))
def then_bot_responds(phrase: str) -> None:
""" Тогда бот говорит конкретную фразу. """
@then("бот показывает виджет")
def... |
TinkoffCreditSystems/overhave | tests/unit/publication/gitlab/test_tokenizer_client.py | <gh_stars>10-100
from typing import Callable
import pytest
from pydantic import ValidationError
from overhave.publication.gitlab import TokenizerClientSettings
class TestTokenizerClient:
""" Tests for :class:`TokenizerClient`. """
@pytest.mark.parametrize(
("initiator", "remote_key", "remote_key_na... |
TinkoffCreditSystems/overhave | overhave/__init__.py | <gh_stars>10-100
# flake8: noqa
from overhave.admin import OverhaveAdminApp, overhave_app
from overhave.authorization import (
AuthorizationStrategy,
OverhaveAdminSettings,
OverhaveAuthorizationSettings,
OverhaveLdapClientSettings,
)
from overhave.base_settings import DataBaseSettings as OverhaveDBSetti... |
TinkoffCreditSystems/overhave | overhave/extra/prefixes.py | from overhave.entities import StepPrefixesModel
RUSSIAN_PREFIXES = StepPrefixesModel(
FEATURE="Функция:",
SCENARIO_OUTLINE="Структура сценария:",
SCENARIO="Сценарий:",
BACKGROUND="Предыстория:",
EXAMPLES="Примеры:",
EXAMPLES_VERTICAL="Примеры: Вертикально",
GIVEN="Дано ",
WHEN="Когда ",... |
TinkoffCreditSystems/overhave | overhave/admin/views/index/view.py | <reponame>TinkoffCreditSystems/overhave
import logging
from pathlib import Path
from typing import Any, Optional
import flask
import ldap
from flask_admin import AdminIndexView, expose
from flask_login import login_required, login_user, logout_user
from sqlalchemy.exc import OperationalError, ProgrammingError
from wer... |
TinkoffCreditSystems/overhave | overhave/extra/__init__.py | <gh_stars>10-100
# flake8: noqa
from .prefixes import RUSSIAN_PREFIXES
|
TinkoffCreditSystems/overhave | overhave/transport/http/gitlab_client/client.py | <filename>overhave/transport/http/gitlab_client/client.py<gh_stars>10-100
import logging
from typing import cast
from gitlab.exceptions import GitlabAuthenticationError
from overhave.transport.http import BaseHttpClient
from overhave.transport.http.base_client import BaseHttpClientException
from overhave.transport.ht... |
TinkoffCreditSystems/overhave | tests/unit/publication/stash/test_stash_manager.py | from typing import List, Mapping, Sequence
import pytest
from faker import Faker
from overhave.entities import FeatureTypeName
from overhave.publication import StashVersionPublisher
from overhave.transport import StashBranch, StashProject, StashRepository, StashReviewer, StashReviewerInfo
from tests.objects import ge... |
TinkoffCreditSystems/overhave | tests/unit/transport/s3/test_s3_manager.py | <reponame>TinkoffCreditSystems/overhave<filename>tests/unit/transport/s3/test_s3_manager.py
from pathlib import Path
from typing import Any, Dict
from unittest import mock
import botocore.exceptions
import pytest
from _pytest.logging import LogCaptureFixture
from overhave.transport import OverhaveS3Bucket, OverhaveS3... |
TinkoffCreditSystems/overhave | tests/integration/storage/test_feature_storage.py | <filename>tests/integration/storage/test_feature_storage.py
from uuid import uuid1
import pytest
from faker import Faker
from overhave import db
from overhave.entities import FeatureModel, FeatureTypeModel
from overhave.storage import FeatureStorage, FeatureTagStorage, SystemUserStorage
from overhave.utils import get... |
TinkoffCreditSystems/overhave | overhave/admin/views/__init__.py | # flake8: noqa
from .access import GroupView, UserView
from .draft import DraftView
from .emulation import EmulationView
from .emulation_run import EmulationRunView
from .feature import FactoryViewUtilsMixin, FeatureView
from .formatters import datetime_formatter, result_report_formatter, task_formatter
from .index imp... |
TinkoffCreditSystems/overhave | overhave/admin/views/formatters/__init__.py | # flake8: noqa
from .formatters import (
datetime_formatter,
draft_feature_formatter,
draft_prurl_formatter,
draft_testrun_formatter,
feature_link_formatter,
json_formatter,
result_report_formatter,
task_formatter,
)
|
TinkoffCreditSystems/overhave | overhave/authorization/manager/secret_mixin.py | <filename>overhave/authorization/manager/secret_mixin.py
import abc
import logging
from uuid import uuid4
from pydantic import SecretStr
from overhave import db
from overhave.authorization.manager.base import BaseAdminAuthorizationManager
from overhave.authorization.settings import OverhaveAuthorizationSettings
from ... |
TinkoffCreditSystems/overhave | overhave/test_execution/test_runner.py | import logging
from pathlib import Path
from typing import List, Optional
import pytest
from overhave.test_execution.settings import OverhaveTestSettings
logger = logging.getLogger(__name__)
class PytestRunner:
""" Class for running `PyTest` in test and collect-only modes. """
def __init__(self, settings:... |
TinkoffCreditSystems/overhave | overhave/transport/s3/objects.py | <reponame>TinkoffCreditSystems/overhave
import enum
class OverhaveS3Bucket(str, enum.Enum):
""" Declared Overhave service buckets names for s3 usage. """
REPORTS = "overhave_reports"
EXTRA = "overhave_extra"
|
TinkoffCreditSystems/overhave | overhave/cli/__init__.py | <reponame>TinkoffCreditSystems/overhave
# flake8: noqa
from .admin import admin
from .consumers import consumer
from .db import db, set_config_to_context
from .group import overhave
from .s3 import s3
from .synchronization import synchronize
|
TinkoffCreditSystems/overhave | tests/unit/transport/s3/conftest.py | from datetime import datetime
from typing import Any, Dict, Optional, cast
from unittest import mock
import pytest
from _pytest.fixtures import FixtureRequest
from faker import Faker
from overhave.transport import OverhaveS3ManagerSettings, S3Manager
from overhave.utils import get_current_time
@pytest.fixture()
def... |
TinkoffCreditSystems/overhave | overhave/publication/settings.py | from typing import List, Mapping, TypeVar
from overhave.base_settings import BaseOverhavePrefix
from overhave.entities import FeatureTypeName
from overhave.publication.objects import PublicationManagerType
class BaseGitPublisherSettings(BaseOverhavePrefix):
""" Base git publisher settings. """
default_revie... |
TinkoffCreditSystems/overhave | demo/steps/parser.py | <filename>demo/steps/parser.py
from pytest_bdd import parsers
from pytest_bdd.parsers import parse
def step_with_args(text: str) -> parse:
return parsers.parse(text, extra_types=dict(Str=str))
|
TinkoffCreditSystems/overhave | overhave/db/base.py | <gh_stars>10-100
from __future__ import annotations
import datetime
import logging
import re
from typing import List, Tuple, Type, Union
import sqlalchemy as sa
from sqlalchemy import MetaData
from sqlalchemy.ext.declarative import as_declarative, declared_attr
from sqlalchemy.orm import Mapper
from sqlalchemy.orm im... |
TinkoffCreditSystems/overhave | tests/unit/feature/conftest.py | from functools import cache
from pathlib import Path
from overhave.entities import OverhaveFileSettings
@cache
def get_incorrect_test_file_settings() -> OverhaveFileSettings:
path = Path(__file__).parent
return OverhaveFileSettings(root_dir=path)
|
TinkoffCreditSystems/overhave | overhave/admin/views/testing_users.py | <gh_stars>10-100
from typing import Dict, Optional, Type, Union
from flask_admin.form import JSONField
from flask_login import current_user
from pydantic import BaseModel
from wtforms import Form, ValidationError
from overhave import db
from overhave.admin.views.base import ModelViewConfigured
from overhave.factory i... |
TinkoffCreditSystems/overhave | overhave/publication/stash/__init__.py | <gh_stars>10-100
# flake8: noqa
from .settings import OverhaveStashPublisherSettings
from .stash_publisher import StashVersionPublisher
|
TinkoffCreditSystems/overhave | overhave/entities/report_manager/models.py | from typing import Optional
from pydantic import BaseModel
from overhave.db import TestReportStatus
class ReportPresenceResolution(BaseModel):
""" Model for report presence resolution result. """
exists: bool
s3_enabled: bool = False
report_status: Optional[TestReportStatus]
@property
def ... |
TinkoffCreditSystems/overhave | tests/unit/transport/http/stash/test_stash_models.py | import datetime
from overhave.transport import StashPrCreationResponse
class TestStashHttpClientModels:
""" Unit tests for :class:`StashHttpClient` models. """
def test_pr_creation_response(self) -> None:
response = StashPrCreationResponse.parse_obj( # noqa: ECE001
{
"id... |
TinkoffCreditSystems/overhave | overhave/pytest_plugin/__init__.py | # flake8: noqa
from .helpers import (
DescriptionManager,
StepContextNotDefinedError,
StepContextRunner,
get_description_manager,
get_scenario,
get_step_context_runner,
has_issue_links,
)
from .plugin_resolver import IPluginResolver, PluginResolver
from .proxy_manager import IProxyManager, P... |
TinkoffCreditSystems/overhave | overhave/factory/components/abstract_consumer.py | import abc
from typing import Generic
from overhave.transport import TRedisTask
class ITaskConsumerFactory(Generic[TRedisTask], abc.ABC):
""" Abstract class for factory, which consumes `TRedisTask` tasks. """
@abc.abstractmethod
def process_task(self, task: TRedisTask) -> None:
pass
|
TinkoffCreditSystems/overhave | overhave/storage/feature_storage.py | <reponame>TinkoffCreditSystems/overhave
import abc
import logging
from typing import Optional, cast
from overhave import db
from overhave.entities import FeatureModel
from overhave.storage.feature_tag_storage import IFeatureTagStorage
logger = logging.getLogger(__name__)
class BaseFeatureStorageException(Exception)... |
TinkoffCreditSystems/overhave | tests/integration/authorization/conftest.py | <gh_stars>10-100
from typing import List, cast
import pytest
from faker import Faker
from pydantic import SecretStr
from pytest_mock import MockFixture
from overhave import OverhaveAuthorizationSettings
from overhave.authorization import (
DefaultAdminAuthorizationManager,
LDAPAdminAuthorizationManager,
L... |
TinkoffCreditSystems/overhave | overhave/publication/gitlab/__init__.py | <reponame>TinkoffCreditSystems/overhave
# flake8: noqa
from .gitlab_publisher import GitlabVersionPublisher
from .settings import OverhaveGitlabPublisherSettings
from .tokenizer.client import TokenizerClient
from .tokenizer.settings import TokenizerClientSettings
|
TinkoffCreditSystems/overhave | overhave/transport/http/gitlab_client/models.py | <reponame>TinkoffCreditSystems/overhave<gh_stars>10-100
from datetime import datetime
from typing import Final, List, Optional
from pydantic import BaseModel, Field
class GitlabRepository(BaseModel):
""" Model for Gitlab merge-request repository. """
id: str = Field(..., alias="project_id")
class GitlabMr... |
TinkoffCreditSystems/overhave | overhave/factory/consumer_factory.py | from functools import cached_property, partial
from typing import Callable, Dict, Type
from overhave.factory.getters import get_emulation_factory, get_publication_factory, get_test_execution_factory
from overhave.pytest_plugin import get_proxy_manager
from overhave.transport import (
AnyRedisTask,
EmulationTas... |
TinkoffCreditSystems/overhave | overhave/factory/context/__init__.py | <gh_stars>10-100
# flake8: noqa
from typing import TypeVar
from .admin_context import OverhaveAdminContext
from .emulation_context import OverhaveEmulationContext
from .publication_context import OverhavePublicationContext
from .synchronizer_context import OverhaveSynchronizerContext
from .test_execution_context impor... |
TinkoffCreditSystems/overhave | overhave/admin/app.py | import logging
import typing
from http import HTTPStatus
from pathlib import Path
import flask
import werkzeug
from overhave import db
from overhave.admin.flask import FlaskLoginManager, get_flask_admin, get_flask_app
from overhave.factory import IAdminFactory, get_publication_factory
from overhave.pytest_plugin impo... |
TinkoffCreditSystems/overhave | demo/steps/feature_type_1/given_steps.py | <filename>demo/steps/feature_type_1/given_steps.py
from pytest_bdd import given
from demo.steps.parser import step_with_args
@given(step_with_args("application {name:Str}"))
def set_application(name: str) -> None:
""" Set special application name. """
@given(step_with_args("call from {source_number:Str} to {ta... |
TinkoffCreditSystems/overhave | overhave/cli/db/__init__.py | <gh_stars>10-100
# flake8: noqa
from .group import db, set_config_to_context
|
TinkoffCreditSystems/overhave | overhave/entities/feature/extractor.py | import logging
from pathlib import Path
from typing import Dict, List
from overhave.entities.feature.abstract import IFeatureExtractor
from overhave.entities.feature.errors import FeatureTypeExtractionError, ScenariosTestFileNotFound
from overhave.entities.feature.types import FeatureTypeName
from overhave.entities.se... |
TinkoffCreditSystems/overhave | overhave/transport/http/base_client/auth.py | <reponame>TinkoffCreditSystems/overhave<gh_stars>10-100
from typing import Any
import requests
class BearerAuth(requests.auth.AuthBase):
""" Class for Bearer authorization pattern. """
def __init__(self, token: str) -> None:
super().__init__()
self.token = token
def __call__(self, r: re... |
TinkoffCreditSystems/overhave | overhave/test_execution/executor.py | import abc
import logging
import tempfile
from pathlib import Path
from overhave.db import TestRunStatus
from overhave.entities import OverhaveFileSettings, ReportManager, TestExecutorContext
from overhave.scenario import FileManager
from overhave.storage import IFeatureStorage, IScenarioStorage, ITestRunStorage
from ... |
TinkoffCreditSystems/overhave | tests/sanity/test_execution/test_process_task.py | from datetime import datetime
from unittest import mock
import pytest
from demo.settings import OverhaveDemoAppLanguage
from overhave import db
from overhave.entities import TestRunModel
@pytest.mark.usefixtures("database")
@pytest.mark.parametrize("test_demo_language", [OverhaveDemoAppLanguage.RU], indirect=True)
... |
TinkoffCreditSystems/overhave | overhave/authorization/__init__.py | # flake8: noqa
from .manager import (
DefaultAdminAuthorizationManager,
IAdminAuthorizationManager,
LDAPAdminAuthorizationManager,
LDAPAuthenticator,
SimpleAdminAuthorizationManager,
)
from .settings import (
AuthorizationStrategy,
OverhaveAdminSettings,
OverhaveAuthorizationSettings,
... |
TinkoffCreditSystems/overhave | overhave/transport/redis/consumer.py | <gh_stars>10-100
import logging
from types import TracebackType
from typing import Iterator, List, Sequence, Type
import walrus
from overhave.entities.settings import OverhaveRedisSettings
from overhave.transport.redis.objects import RedisPendingData, RedisStream, RedisUnreadData
from overhave.transport.redis.templat... |
TinkoffCreditSystems/overhave | tests/integration/storage/test_system_group_storage.py | import pytest
from faker import Faker
from overhave import db
from overhave.storage import SystemUserGroupStorage
@pytest.mark.usefixtures("database")
class TestSystemGroupStorage:
""" Integration tests for :class:`TestSystemGroupStorage`. """
def test_has_any_group_true(self, test_system_user_group_storage... |
TinkoffCreditSystems/overhave | overhave/entities/archiver.py | from pathlib import Path
from shutil import make_archive, unpack_archive
from overhave.entities.settings import OverhaveFileSettings
class BaseArchiveManagerException(Exception):
""" Base exception for :class:`ArchiveManager`. """
class IncorrectExtensionError(BaseArchiveManagerException):
""" Exception fo... |
TinkoffCreditSystems/overhave | tests/unit/admin/test_tag_view.py | from copy import deepcopy
from unittest import mock
import pytest
from faker import Faker
from wtforms import ValidationError
from overhave import db
from overhave.admin import views
@pytest.mark.parametrize("test_mock_patch_user_directory", ["overhave.admin.views.tag.current_user"], indirect=True)
class TestTagVie... |
TinkoffCreditSystems/overhave | tests/unit/conftest.py | from typing import Optional, cast
import pytest
from _pytest.fixtures import FixtureRequest
from pytest_mock import MockFixture
from overhave import OverhaveFileSettings, OverhaveProjectSettings
from overhave.entities import FeatureExtractor, OverhaveScenarioCompilerSettings
from overhave.scenario import FileManager
... |
TinkoffCreditSystems/overhave | overhave/publication/stash/stash_publisher.py | import logging
from requests import HTTPError
from overhave.db import DraftStatus
from overhave.entities import OverhaveFileSettings, PublisherContext
from overhave.publication.git_publisher import GitVersionPublisher
from overhave.publication.stash.settings import OverhaveStashPublisherSettings
from overhave.scenari... |
TinkoffCreditSystems/overhave | overhave/pytest_plugin/helpers/allure_utils/__init__.py | # flake8: noqa
from .common import add_scenario_title_to_report, get_description_manager, get_scenario, get_step_context_runner
from .description_manager import DescriptionManager
from .step_context_runner import StepContextNotDefinedError, StepContextRunner
|
TinkoffCreditSystems/overhave | tests/unit/entities/test_archiver.py | from pathlib import Path
import pytest
from overhave import OverhaveFileSettings
from overhave.entities.archiver import ArchiveManager
@pytest.mark.parametrize("extension", ["zip"])
class TestArchiverManager:
""" Unit tests for :class:`ArchiveManager`. """
def test_archive_path(
self,
exten... |
TinkoffCreditSystems/overhave | tests/sanity/db/test_db_cmds.py | import click
from overhave.cli.db.regular import _create_all, _drop_all
class TestOverhaveDatabaseCmds:
""" Sanity tests for database operating CLI commands. """
def test_create_all(self, click_ctx_mock: click.Context, set_config_to_ctx: None) -> None:
_create_all(click_ctx_mock.obj)
def test_d... |
TinkoffCreditSystems/overhave | tests/unit/publication/conftest.py | <reponame>TinkoffCreditSystems/overhave
from typing import List, Mapping, Sequence, cast
import pytest
from faker import Faker
from overhave.entities import FeatureTypeName
from tests.objects import get_test_feature_extractor
@pytest.fixture()
def test_repository_id_or_name(faker: Faker) -> str:
return cast(str... |
TinkoffCreditSystems/overhave | overhave/factory/components/synchronizer_factory.py | <filename>overhave/factory/components/synchronizer_factory.py
import abc
from functools import cached_property
from overhave.factory.base_factory import BaseOverhaveFactory, IOverhaveFactory
from overhave.factory.context import OverhaveSynchronizerContext
from overhave.scenario import ScenarioParser
from overhave.sync... |
TinkoffCreditSystems/overhave | tests/unit/transport/http/gitlab/test_gitlab_python_client.py | from typing import Callable
import gitlab
import pytest
from overhave.transport.http.gitlab_client.utils import InvalidTokenTypeError
class TestGitlabPythonClient:
""" Unit tests for gitlab-python utils. """
@pytest.mark.parametrize(("token_type", "token"), [("gotcha", "peka")])
def test_get_gitlab_pyt... |
TinkoffCreditSystems/overhave | overhave/db/statuses.py | import enum
class TestRunStatus(str, enum.Enum):
""" Enum for test run statuses. """
__test__ = False
STARTED = "STARTED"
RUNNING = "RUNNING"
FAILED = "FAILED"
SUCCESS = "SUCCESS"
INTERNAL_ERROR = "INTERNAL_ERROR"
@property
def finished(self) -> bool:
return self in (Tes... |
TinkoffCreditSystems/overhave | overhave/scenario/errors.py | class ScenarioCompilerError(Exception):
""" Base exception for :class:`ScenarioCompiler` errors. """
class IncorrectScenarioTextError(ScenarioCompilerError):
""" Exception for incorrect scenario text format. """
class ScenarioParserError(Exception):
""" Base exception for parsing error. """
class Feat... |
TinkoffCreditSystems/overhave | tests/sanity/db/conftest.py | from unittest import mock
import click
import pytest
from overhave import OverhaveDBSettings, set_config_to_context
@pytest.fixture()
def click_ctx_mock() -> click.Context:
return mock.create_autospec(click.Context)
@pytest.fixture()
def set_config_to_ctx(db_settings: OverhaveDBSettings, database: None, click... |
TinkoffCreditSystems/overhave | tests/integration/storage/conftest.py | import datetime
import socket
from typing import cast
from unittest import mock
from uuid import uuid1
import pytest
from _pytest.fixtures import FixtureRequest
from faker import Faker
from pydantic import SecretStr
from overhave import db
from overhave.db import DraftStatus
from overhave.entities.converters import (... |
TinkoffCreditSystems/overhave | overhave/admin/views/base.py | <filename>overhave/admin/views/base.py
from typing import Any, cast
from flask import redirect, request, url_for
from flask_admin.contrib.sqla import ModelView
from flask_login import current_user
from overhave.admin.views.formatters.formatters import (
datetime_formatter,
draft_feature_formatter,
draft_p... |
TinkoffCreditSystems/overhave | overhave/factory/context/test_execution_context.py | from typing import Optional
from overhave.entities import (
OverhaveDescriptionManagerSettings,
OverhaveFileSettings,
OverhaveLanguageSettings,
OverhaveReportManagerSettings,
OverhaveScenarioCompilerSettings,
OverhaveStepContextSettings,
)
from overhave.factory.context.base_context import BaseF... |
TinkoffCreditSystems/overhave | overhave/entities/feature/abstract.py | <reponame>TinkoffCreditSystems/overhave
import abc
from pathlib import Path
from typing import Dict, List
from overhave.entities.feature.types import FeatureTypeName
class IFeatureExtractor(abc.ABC):
""" Abstract class for specified project's feature types resolution. """
@property
@abc.abstractmethod
... |
TinkoffCreditSystems/overhave | overhave/transport/http/gitlab_client/objects.py | <gh_stars>10-100
import enum
class TokenType(enum.Enum):
""" Enum for token types you want. """
OAUTH = "oauth"
PRIVATE = "private"
JOB = "job"
|
TinkoffCreditSystems/overhave | overhave/entities/settings.py | from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from pydantic import root_validator, validator
from pydantic.datetime_parse import timedelta
from yarl import URL
from overhave.base_settings import BaseOverhavePrefix
from overhave.entities.language import StepPrefixesModel
class Overhave... |
TinkoffCreditSystems/overhave | overhave/cli/group.py | import click
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
def overhave() -> None:
pass
|
TinkoffCreditSystems/overhave | overhave/pytest_plugin/helpers/basic.py | from _pytest.nodes import Item
from pytest_bdd.parser import Scenario, Step
def get_scenario(item: Item) -> Scenario:
return item._obj.__scenario__ # type: ignore
def is_pytest_bdd_item(item: Item) -> bool:
if hasattr(item, "_obj"):
return hasattr(item._obj, "__scenario__") and isinstance(get_scena... |
TinkoffCreditSystems/overhave | overhave/storage/test_run_storage.py | import abc
from typing import Optional, cast
from overhave import db
from overhave.entities import TestRunModel
from overhave.utils import get_current_time
class ITestRunStorage(abc.ABC):
""" Abstract class for test runs storage. """
@abc.abstractmethod
def create_test_run(self, scenario_id: int, execut... |
TinkoffCreditSystems/overhave | demo/steps/feature_type_2/given_steps.py | from pytest_bdd import given
@given("I am bank client")
def set_client() -> None:
""" Set client. """
|
TinkoffCreditSystems/overhave | overhave/test_execution/objects.py | import re
from typing import NewType
from pydantic import BaseModel, validator
from pytest_bdd.types import STEP_TYPES
StepTypeName = NewType("StepTypeName", str)
class BddStepModel(BaseModel):
""" Model for pytest_bdd step in Overhave. """
type: StepTypeName
name: str
doc: str
@validator("typ... |
TinkoffCreditSystems/overhave | overhave/entities/__init__.py | <filename>overhave/entities/__init__.py
# flake8: noqa
from .archiver import ArchiveManager
from .converters import (
DraftModel,
EmulationRunModel,
FeatureModel,
FeatureTypeModel,
PublisherContext,
ScenarioModel,
SystemUserModel,
TagModel,
TestExecutorContext,
TestRunModel,
)
fr... |
TinkoffCreditSystems/overhave | overhave/transport/http/stash_client/settings.py | <gh_stars>10-100
from yarl import URL
from overhave.transport.http.base_client import BaseHttpClientSettings
class OverhaveStashClientSettings(BaseHttpClientSettings):
""" Settings for :class:`StashHttpClient`. """
pr_path: str = "rest/api/1.0/projects/{project_key}/repos/{repository_name}/pull-requests"
... |
TinkoffCreditSystems/overhave | tests/unit/admin/test_feature_view.py | <reponame>TinkoffCreditSystems/overhave<filename>tests/unit/admin/test_feature_view.py
from unittest import mock
import pytest
from wtforms.validators import ValidationError
from overhave import db
from overhave.admin.views import FeatureView
@pytest.mark.parametrize("test_mock_patch_user_directory", ["overhave.adm... |
TinkoffCreditSystems/overhave | overhave/utils/__init__.py | <reponame>TinkoffCreditSystems/overhave
# flake8: noqa
from .time import get_current_time
from .url import make_url
|
TinkoffCreditSystems/overhave | overhave/pytest_plugin/proxy_manager.py | import abc
from functools import cache, cached_property
from typing import Optional, Union
from overhave.factory import IAdminFactory, ITestExecutionFactory
from overhave.pytest_plugin.config_injector import ConfigInjector
from overhave.pytest_plugin.plugin_resolver import IPluginResolver, PluginResolver
AnyProxyFact... |
TinkoffCreditSystems/overhave | overhave/pytest_plugin/plugin.py | <reponame>TinkoffCreditSystems/overhave<filename>overhave/pytest_plugin/plugin.py<gh_stars>10-100
import enum
import logging
from typing import Any, Callable, Dict, Optional
import _pytest
import pytest
from _pytest.config import Config
from _pytest.config.argparsing import Argument, Parser
from _pytest.fixtures impor... |
TinkoffCreditSystems/overhave | demo/settings.py | <reponame>TinkoffCreditSystems/overhave
import enum
from copy import deepcopy
from functools import cached_property
from pathlib import Path
from typing import Dict
from pydantic import BaseSettings
from overhave import (
OverhaveAdminSettings,
OverhaveFileSettings,
OverhaveLanguageSettings,
OverhaveS... |
TinkoffCreditSystems/overhave | overhave/transport/http/gitlab_client/utils.py | import gitlab
from overhave.transport.http.gitlab_client.objects import TokenType
class InvalidTokenTypeError(Exception):
""" Error for choosing invalid token type value. """
def get_gitlab_python_client(url: str, token_type: TokenType, token: str) -> gitlab.Gitlab:
if token_type is TokenType.OAUTH:
... |
TinkoffCreditSystems/overhave | overhave/transport/http/base_client/client.py | <reponame>TinkoffCreditSystems/overhave
import logging
from json import JSONDecodeError
from typing import Any, Dict, Generic, Mapping, Optional, Union, cast
import requests
import tenacity
from pydantic import BaseModel, ValidationError
from pydantic.main import ModelMetaclass
from requests.auth import AuthBase
from ... |
TinkoffCreditSystems/overhave | demo/steps/feature_type_2/then_steps.py | <filename>demo/steps/feature_type_2/then_steps.py
from pytest_bdd import then
from demo.steps.parser import step_with_args
@then(step_with_args("bot responds {phrase:Str}"))
def then_bot_responds(phrase: str) -> None:
""" Then bot responds certain phrase. """
@then("bot shows widget")
def then_bot_shows_widget... |
TinkoffCreditSystems/overhave | overhave/scenario/parser.py | <filename>overhave/scenario/parser.py
import logging
import re
from datetime import datetime
from functools import cached_property
from typing import List, Optional
from pydantic import BaseModel
from pytest_bdd import types as default_types
from overhave.entities import IFeatureExtractor, OverhaveLanguageSettings, O... |
TinkoffCreditSystems/overhave | tests/sanity/synchronization/test_synchronizer.py | <reponame>TinkoffCreditSystems/overhave<gh_stars>10-100
from typing import List
import pytest
import sqlalchemy.exc
from demo.settings import OverhaveDemoAppLanguage
from overhave import db
from overhave.entities import FeatureTypeModel, SystemUserModel
from overhave.scenario.errors import FeatureNameParsingError
fro... |
TinkoffCreditSystems/overhave | overhave/factory/__init__.py | # flake8: noqa
from .base_factory import IOverhaveFactory
from .components import (
AdminFactory,
EmulationFactory,
IAdminFactory,
IEmulationFactory,
IPublicationFactory,
ISynchronizerFactory,
ITaskConsumerFactory,
ITestExecutionFactory,
PublicationFactory,
TestExecutionFactory,
... |
TinkoffCreditSystems/overhave | overhave/admin/views/formatters/safe_formatter.py | import logging
from types import FunctionType
from typing import Any, Callable, Sequence, Type, Union
from flask_admin.contrib.sqla import ModelView
from markupsafe import Markup
from overhave import db
logger = logging.getLogger(__name__)
def _default_formatter_result(
model: db.BaseTable, name: str, supporte... |
TinkoffCreditSystems/overhave | overhave/synchronization/__init__.py | # flake8: noqa
from .abstract import IOverhaveSynchronizer
from .synchronizer import OverhaveSynchronizer
|
TinkoffCreditSystems/overhave | overhave/transport/redis/template.py | import walrus
from overhave.entities.settings import OverhaveRedisSettings
class RedisTemplate:
""" Base class for :class:`RedisProducer` and :class:`RedisConsumer`. """
def __init__(self, settings: OverhaveRedisSettings):
self._settings = settings
self._database = walrus.Database(
... |
TinkoffCreditSystems/overhave | overhave/factory/components/publication_factory.py | <reponame>TinkoffCreditSystems/overhave
import abc
from functools import cached_property
from overhave.factory.base_factory import BaseOverhaveFactory, IOverhaveFactory
from overhave.factory.components.abstract_consumer import ITaskConsumerFactory
from overhave.factory.context import OverhavePublicationContext
from ov... |
TinkoffCreditSystems/overhave | overhave/factory/context/base_context.py | from typing import Optional, cast
from pydantic import BaseSettings
from overhave.entities import (
OverhaveEmulationSettings,
OverhaveFileSettings,
OverhaveLanguageSettings,
OverhaveReportManagerSettings,
OverhaveScenarioCompilerSettings,
)
from overhave.test_execution import OverhaveProjectSetti... |
TinkoffCreditSystems/overhave | overhave/storage/system_user_group_storage.py | import abc
from typing import List
from overhave import db
class ISystemUserGroupStorage(abc.ABC):
""" Abstract class for system user storage. """
@staticmethod
@abc.abstractmethod
def has_any_group(user_groups: List[str]) -> bool:
pass
class SystemUserGroupStorage(ISystemUserGroupStorage)... |
TinkoffCreditSystems/overhave | overhave/factory/base_factory.py | import abc
from functools import cached_property
from typing import Generic, Optional, Type, cast
from overhave.entities import ArchiveManager, FeatureExtractor, IFeatureExtractor, ReportManager
from overhave.factory.context import TApplicationContext
from overhave.scenario import FileManager, ScenarioCompiler
from ov... |
TinkoffCreditSystems/overhave | overhave/publication/abstract_publisher.py | <filename>overhave/publication/abstract_publisher.py
import abc
from overhave.transport import PublicationTask
class IVersionPublisher(abc.ABC):
""" Abstract class for feature version's pull requests management. """
@abc.abstractmethod
def publish_version(self, draft_id: int) -> None:
pass
... |
TinkoffCreditSystems/overhave | overhave/pytest_plugin/helpers/links.py | from pathlib import Path
from typing import List, Optional
import allure
from _pytest.nodes import Item
from pytest_bdd.parser import Scenario
from overhave.pytest_plugin.helpers.basic import get_scenario, is_pytest_bdd_item
from overhave.test_execution import OverhaveProjectSettings
def _get_issue_links(scenario: ... |
TinkoffCreditSystems/overhave | tests/integration/storage/test_emulation.py | <reponame>TinkoffCreditSystems/overhave<filename>tests/integration/storage/test_emulation.py
from typing import cast
import pytest
from faker import Faker
from overhave import db
from overhave.db import EmulationStatus
from overhave.entities import SystemUserModel
from overhave.storage.emulation_storage import Emulat... |
TinkoffCreditSystems/overhave | overhave/base_settings.py | import logging
import socket
from logging.config import DictConfigurator # type: ignore
from typing import Any, Dict, Optional
from pydantic import BaseSettings, Field, validator
from sqlalchemy import engine_from_config
from sqlalchemy.engine import Engine
from sqlalchemy.engine.url import URL, make_url
from sqlalch... |
TinkoffCreditSystems/overhave | overhave/factory/context/publication_context.py | from typing import Optional
from overhave.entities import OverhaveFileSettings, OverhaveLanguageSettings, OverhaveScenarioCompilerSettings
from overhave.factory.context.base_context import BaseFactoryContext
from overhave.publication.gitlab import OverhaveGitlabPublisherSettings, TokenizerClientSettings
from overhave.... |
TinkoffCreditSystems/overhave | tests/integration/admin/conftest.py | <reponame>TinkoffCreditSystems/overhave
import os
import tempfile
from pathlib import Path
from typing import Callable
from uuid import uuid1
import pytest
from faker import Faker
from flask.testing import FlaskClient
from overhave import OverhaveAdminApp, overhave_app
from overhave.base_settings import DataBaseSetti... |
TinkoffCreditSystems/overhave | overhave/admin/views/tag.py | <gh_stars>10-100
import logging
import re
from flask_login import current_user
from wtforms import Form, ValidationError
from overhave import db
from overhave.admin.views.base import ModelViewConfigured
logger = logging.getLogger(__name__)
class TagsView(ModelViewConfigured):
""" View for :class:`Tags` table. ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.