diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index c621410a7..3200a2bd3 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -19,15 +19,15 @@ jobs: outputs: matrix_supportedSplunk: ${{ steps.matrix.outputs.latestSplunk }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - id: matrix - uses: splunk/addonfactory-test-matrix-action@v3.1.2 + uses: splunk/addonfactory-test-matrix-action@v3.3.0 fossa-scan: continue-on-error: true runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: run fossa anlyze and create report run: | curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash @@ -36,7 +36,7 @@ jobs: env: FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} - name: upload THIRDPARTY file - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: THIRDPARTY path: /tmp/THIRDPARTY @@ -49,16 +49,16 @@ jobs: compliance-copyrights: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: apache/skywalking-eyes@v0.6.0 + - uses: actions/checkout@v7 + - uses: apache/skywalking-eyes@v0.8.0 pre-commit: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.13" - uses: pre-commit/action@v3.0.1 semgrep: @@ -69,12 +69,12 @@ jobs: test-splunk-unit: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Generate GitHub App Token id: app-token - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@v3.2.0 with: client-id: ${{ secrets.GH_APP_CLIENT_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} @@ -83,7 +83,7 @@ jobs: run: | git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com - curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1 poetry install poetry run pytest -v tests/unit @@ -101,12 +101,12 @@ jobs: matrix: splunk: ${{ fromJson(needs.meta.outputs.matrix_supportedSplunk) }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Generate GitHub App Token id: app-token - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@v3.2.0 with: client-id: ${{ secrets.GH_APP_CLIENT_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} @@ -134,7 +134,7 @@ jobs: -v pytest-splunk-addon_results:/work/test-results \ registry.access.redhat.com/ubi7/ubi docker cp dummy:/work/test-results/test.xml test-results-${{ matrix.splunk.version }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 if: always() with: name: splunk ${{ matrix.splunk.version }} external test artifacts @@ -170,23 +170,23 @@ jobs: "splunk_app_req_with_ep", ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Generate GitHub App Token id: app-token - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@v3.2.0 with: client-id: ${{ secrets.GH_APP_CLIENT_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: - python-version: 3.7 + python-version: "3.13" - run: | git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com - curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1 poetry install poetry run pytest -v --splunk-version=${{ matrix.splunk.version }} -m docker -m ${{ matrix.test-marker }} tests/e2e env: @@ -232,26 +232,26 @@ jobs: # label: "7.x" name: "CIM models ${{ matrix.cim-models.label }} / Splunk ${{ matrix.splunk.version }}" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: submodules: true - name: Generate GitHub App Token id: app-token - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@v3.2.0 with: client-id: ${{ secrets.GH_APP_CLIENT_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: - python-version: "3.7" + python-version: "3.13" - name: Install PSA with CIM models ${{ matrix.cim-models.label }} env: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf https://github.com git config --global --add url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com".insteadOf ssh://git@github.com - curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1 poetry install # Override the dev-dependency CIM models with the matrix version. # Using pip inside the Poetry venv so the pytester subprocess sees @@ -292,7 +292,7 @@ jobs: - test-cim-models-versions runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 with: # Very Important semantic-release won't trigger a tagged # build if this is not set false @@ -300,24 +300,24 @@ jobs: persist-credentials: false - name: Generate GitHub App Token id: app-token - uses: actions/create-github-app-token@v3 + uses: actions/create-github-app-token@v3.2.0 with: client-id: ${{ secrets.GH_APP_CLIENT_ID }} private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} owner: ${{ github.repository_owner }} - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v7 with: - python-version: "3.7" - - uses: actions/download-artifact@v4 + python-version: "3.13" + - uses: actions/download-artifact@v8 with: name: THIRDPARTY - name: Update Notices run: cp -f THIRDPARTY NOTICE - name: Install Poetry run: | - curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1 - id: semantic - uses: splunk/semantic-release-action@v1.3 + uses: splunk/semantic-release-action@v1.3.10 with: git_committer_name: ${{ secrets.SA_GH_USER_NAME }} git_committer_email: ${{ secrets.SA_GH_USER_EMAIL }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8e85d070d..05926fe80 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,12 +14,12 @@ jobs: contents: write pages: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 with: - python-version: 3.8 + python-version: "3.13" - run: | - curl -sSL https://install.python-poetry.org | python3 - --version 1.5.1 + curl -sSL https://install.python-poetry.org | python3 - --version 2.4.1 pip install mkdocs mkdocs-material mkdocstrings-python - name: Deploy to GitHub Pages if: github.ref_name == 'main' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d27d426e6..766a2ed4c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,11 +15,11 @@ # repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v6.0.0 hooks: - id: check-merge-conflict - id: debug-statements - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 26.5.1 hooks: - id: black diff --git a/deps/apps/Splunk_SA_CIM/bin/modaction_queue_handler.py b/deps/apps/Splunk_SA_CIM/bin/modaction_queue_handler.py index eb3ffcb52..beaef1e23 100644 --- a/deps/apps/Splunk_SA_CIM/bin/modaction_queue_handler.py +++ b/deps/apps/Splunk_SA_CIM/bin/modaction_queue_handler.py @@ -20,7 +20,6 @@ ModularActionQutils, ) - logger = setup_logger("modaction_queue_handler") diff --git a/deps/apps/Splunk_SA_CIM/lib/cim_models.py b/deps/apps/Splunk_SA_CIM/lib/cim_models.py index 799e63bc1..e0d24aaeb 100644 --- a/deps/apps/Splunk_SA_CIM/lib/cim_models.py +++ b/deps/apps/Splunk_SA_CIM/lib/cim_models.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved. """ + import json import splunk.rest as rest diff --git a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/__init__.py b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/__init__.py index 7cefc29e8..2d585527f 100644 --- a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/__init__.py +++ b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/__init__.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved. """ + from .base_modinput import logger from .xml_modinput import XmlModularInput from .json_modinput import JsonModularInput diff --git a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/base_modinput.py b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/base_modinput.py index 35ec88ebb..4062cac75 100644 --- a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/base_modinput.py +++ b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/base_modinput.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2020 Splunk Inc. All Rights Reserved. """ + import argparse import getpass import hashlib diff --git a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/fields.py b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/fields.py index 435891537..cc2c856e9 100644 --- a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/fields.py +++ b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/fields.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved. """ + import json import re diff --git a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/json_modinput.py b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/json_modinput.py index 4565e6118..09e6b9722 100644 --- a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/json_modinput.py +++ b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/json_modinput.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2019 Splunk Inc. All Rights Reserved. """ + import sys import json from .base_modinput import BaseModularInput, ModularInputConfig diff --git a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/xml_modinput.py b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/xml_modinput.py index 922a43170..26c942695 100644 --- a/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/xml_modinput.py +++ b/deps/apps/Splunk_SA_CIM/lib/splunk_sa_cim/modinput/xml_modinput.py @@ -1,6 +1,7 @@ """ Copyright (C) 2005 - 2017 Splunk Inc. All Rights Reserved. """ + import sys import xml.dom from xml.dom.minidom import Document diff --git a/mkdocs.yml b/mkdocs.yml index 22090ad46..ab3b1bfb5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -37,11 +37,6 @@ plugins: - mkdocstrings: handlers: python: - setup_commands: - - import sys - - sys.path.append('../') - selection: - new_path_syntax: true options: inherited_members: false diff --git a/pyproject.toml b/pyproject.toml index 0558636d8..c0a2463b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Topic :: Software Development :: Testing", "Programming Language :: Python", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "License :: OSI Approved :: Apache Software License", ] diff --git a/pytest_splunk_addon/addon_parser/__init__.py b/pytest_splunk_addon/addon_parser/__init__.py index 1c892d6e2..3c01d616e 100644 --- a/pytest_splunk_addon/addon_parser/__init__.py +++ b/pytest_splunk_addon/addon_parser/__init__.py @@ -20,6 +20,7 @@ Supports: fields from props & transforms, tags, eventtypes, savedsearches """ + import os import re import logging diff --git a/pytest_splunk_addon/addon_parser/eventtype_parser.py b/pytest_splunk_addon/addon_parser/eventtype_parser.py index ad10959bd..ea254b47e 100644 --- a/pytest_splunk_addon/addon_parser/eventtype_parser.py +++ b/pytest_splunk_addon/addon_parser/eventtype_parser.py @@ -16,6 +16,7 @@ """ Provides eventtypes.conf parsing mechanism """ + from typing import Dict from typing import Generator from typing import Optional diff --git a/pytest_splunk_addon/addon_parser/fields.py b/pytest_splunk_addon/addon_parser/fields.py index f4f69f42d..923ab6024 100644 --- a/pytest_splunk_addon/addon_parser/fields.py +++ b/pytest_splunk_addon/addon_parser/fields.py @@ -15,7 +15,7 @@ # # -*- coding: utf-8 -*- """ -Provides the Field class containing all the field properties and a decorator +Provides the Field class containing all the field properties and a decorator to convert a list to field list """ diff --git a/pytest_splunk_addon/addon_parser/parser_cache.py b/pytest_splunk_addon/addon_parser/parser_cache.py index 06c2a6412..9bfd9dadc 100644 --- a/pytest_splunk_addon/addon_parser/parser_cache.py +++ b/pytest_splunk_addon/addon_parser/parser_cache.py @@ -26,6 +26,7 @@ - Atomic writes with integrity hash to prevent corruption - Automatic cleanup on process exit """ + import atexit import hashlib import logging diff --git a/pytest_splunk_addon/addon_parser/props_parser.py b/pytest_splunk_addon/addon_parser/props_parser.py index c3dc48a24..7c76102f2 100644 --- a/pytest_splunk_addon/addon_parser/props_parser.py +++ b/pytest_splunk_addon/addon_parser/props_parser.py @@ -16,6 +16,7 @@ """ Provides props.conf parsing mechanism """ + from typing import Dict from typing import Generator from typing import Optional diff --git a/pytest_splunk_addon/addon_parser/savedsearches_parser.py b/pytest_splunk_addon/addon_parser/savedsearches_parser.py index 9ccdf2ac6..c606dc826 100644 --- a/pytest_splunk_addon/addon_parser/savedsearches_parser.py +++ b/pytest_splunk_addon/addon_parser/savedsearches_parser.py @@ -16,6 +16,7 @@ """ Provides savedsearches.conf parsing mechanism """ + from typing import Dict from typing import Generator from typing import Optional diff --git a/pytest_splunk_addon/addon_parser/tags_parser.py b/pytest_splunk_addon/addon_parser/tags_parser.py index 6f62bebf3..8a9870803 100644 --- a/pytest_splunk_addon/addon_parser/tags_parser.py +++ b/pytest_splunk_addon/addon_parser/tags_parser.py @@ -16,6 +16,7 @@ """ Provides tags.conf parsing mechanism """ + import os from typing import Optional, Dict, Generator from urllib.parse import unquote diff --git a/pytest_splunk_addon/addon_parser/transforms_parser.py b/pytest_splunk_addon/addon_parser/transforms_parser.py index 7f4404f57..a4cfe83e7 100644 --- a/pytest_splunk_addon/addon_parser/transforms_parser.py +++ b/pytest_splunk_addon/addon_parser/transforms_parser.py @@ -16,6 +16,7 @@ """ Provides transforms.conf parsing mechanism """ + from typing import Dict from typing import Generator from typing import Optional diff --git a/pytest_splunk_addon/app_test_generator.py b/pytest_splunk_addon/app_test_generator.py index 68bc68cc4..bc02f1eb9 100644 --- a/pytest_splunk_addon/app_test_generator.py +++ b/pytest_splunk_addon/app_test_generator.py @@ -25,6 +25,7 @@ When running with pytest-xdist, generated test parameters are cached to avoid redundant generation across workers. """ + import logging import os from .fields_tests import FieldTestGenerator diff --git a/pytest_splunk_addon/cim_compliance/cim_report_generator.py b/pytest_splunk_addon/cim_compliance/cim_report_generator.py index f7b476716..0f56237fe 100644 --- a/pytest_splunk_addon/cim_compliance/cim_report_generator.py +++ b/pytest_splunk_addon/cim_compliance/cim_report_generator.py @@ -16,6 +16,7 @@ """ Calculates the statistics of test cases and Creates a MarkDown Report """ + from .markdown_report import MarkDownReport from .markdown_table import MarkdownTable from itertools import groupby diff --git a/pytest_splunk_addon/cim_compliance/markdown_report.py b/pytest_splunk_addon/cim_compliance/markdown_report.py index d135e63ec..2afd0c6da 100644 --- a/pytest_splunk_addon/cim_compliance/markdown_report.py +++ b/pytest_splunk_addon/cim_compliance/markdown_report.py @@ -16,6 +16,7 @@ """ Markdown generator """ + from .base_report import CIMReport diff --git a/pytest_splunk_addon/cim_compliance/markdown_table.py b/pytest_splunk_addon/cim_compliance/markdown_table.py index e8ea3e897..7fbd70bf0 100644 --- a/pytest_splunk_addon/cim_compliance/markdown_table.py +++ b/pytest_splunk_addon/cim_compliance/markdown_table.py @@ -16,6 +16,7 @@ """ Markdown table generator """ + from .base_table import BaseTable diff --git a/pytest_splunk_addon/cim_compliance/plugin.py b/pytest_splunk_addon/cim_compliance/plugin.py index f88cb680e..aea9a6afc 100644 --- a/pytest_splunk_addon/cim_compliance/plugin.py +++ b/pytest_splunk_addon/cim_compliance/plugin.py @@ -16,6 +16,7 @@ """ Plugin to generate the report dynamically after executing the test cases """ + import pytest import time import os @@ -52,9 +53,9 @@ def pytest_runtest_logreport(self, report): data_dict["test_property"] = "-" try: if report.outcome == "failed": - data_dict[ - "test_property" - ] = report.longrepr.reprcrash.message.splitlines()[0][:100] + data_dict["test_property"] = ( + report.longrepr.reprcrash.message.splitlines()[0][:100] + ) except AttributeError as e: pass diff --git a/pytest_splunk_addon/cim_tests/__init__.py b/pytest_splunk_addon/cim_tests/__init__.py index 067091577..a1a4a07e7 100644 --- a/pytest_splunk_addon/cim_tests/__init__.py +++ b/pytest_splunk_addon/cim_tests/__init__.py @@ -15,7 +15,7 @@ # # -*- coding: utf-8 -*- """ -Test generation mechanism to verify the CIM compatibility of an Add-on +Test generation mechanism to verify the CIM compatibility of an Add-on """ from .json_schema import JSONSchema diff --git a/pytest_splunk_addon/cim_tests/base_schema.py b/pytest_splunk_addon/cim_tests/base_schema.py index 88c2e192b..05bc5f029 100644 --- a/pytest_splunk_addon/cim_tests/base_schema.py +++ b/pytest_splunk_addon/cim_tests/base_schema.py @@ -15,8 +15,9 @@ # # -*- coding: utf-8 -*- """ -Includes base class for data model schema. +Includes base class for data model schema. """ + from abc import ABC, abstractclassmethod diff --git a/pytest_splunk_addon/cim_tests/data_model.py b/pytest_splunk_addon/cim_tests/data_model.py index a538d6e19..af4dbba61 100644 --- a/pytest_splunk_addon/cim_tests/data_model.py +++ b/pytest_splunk_addon/cim_tests/data_model.py @@ -15,7 +15,7 @@ # # -*- coding: utf-8 -*- """ -Includes DataModel class which handles the DataSets within a data model. +Includes DataModel class which handles the DataSets within a data model. """ from . import DataSet diff --git a/pytest_splunk_addon/cim_tests/data_model_handler.py b/pytest_splunk_addon/cim_tests/data_model_handler.py index d6ce4642d..fa6b1dcf3 100644 --- a/pytest_splunk_addon/cim_tests/data_model_handler.py +++ b/pytest_splunk_addon/cim_tests/data_model_handler.py @@ -18,8 +18,9 @@ Provides Data Model handling functionalities. Such as * Parse all the data model JSON files -* Get Mapped data model for an eventtype +* Get Mapped data model for an eventtype """ + import os import logging diff --git a/pytest_splunk_addon/cim_tests/data_set.py b/pytest_splunk_addon/cim_tests/data_set.py index 228ebe091..59586e2be 100644 --- a/pytest_splunk_addon/cim_tests/data_set.py +++ b/pytest_splunk_addon/cim_tests/data_set.py @@ -17,6 +17,7 @@ """ Includes DataSet class which handles a single data set """ + from ..addon_parser import Field diff --git a/pytest_splunk_addon/cim_tests/field_test_helper.py b/pytest_splunk_addon/cim_tests/field_test_helper.py index e92d9b89b..841761249 100644 --- a/pytest_splunk_addon/cim_tests/field_test_helper.py +++ b/pytest_splunk_addon/cim_tests/field_test_helper.py @@ -17,6 +17,7 @@ """ Provides the helper methods to test addon_parser.Field object """ + import logging import json from .field_test_adapter import FieldTestAdapter diff --git a/pytest_splunk_addon/cim_tests/json_schema.py b/pytest_splunk_addon/cim_tests/json_schema.py index ba398fd93..36e5d3c7d 100644 --- a/pytest_splunk_addon/cim_tests/json_schema.py +++ b/pytest_splunk_addon/cim_tests/json_schema.py @@ -17,6 +17,7 @@ """ Includes JSON schema for data models """ + import json import os.path as op from .base_schema import BaseSchema diff --git a/pytest_splunk_addon/cim_tests/test_generator.py b/pytest_splunk_addon/cim_tests/test_generator.py index 5e21155b0..9b085c848 100644 --- a/pytest_splunk_addon/cim_tests/test_generator.py +++ b/pytest_splunk_addon/cim_tests/test_generator.py @@ -15,8 +15,9 @@ # # -*- coding: utf-8 -*- """ -Generates test cases to verify the CIM compatibility . +Generates test cases to verify the CIM compatibility . """ + import logging import pytest import json diff --git a/pytest_splunk_addon/cim_tests/test_templates.py b/pytest_splunk_addon/cim_tests/test_templates.py index f779af9b3..b919c355f 100644 --- a/pytest_splunk_addon/cim_tests/test_templates.py +++ b/pytest_splunk_addon/cim_tests/test_templates.py @@ -17,6 +17,7 @@ """ Includes the test scenarios to check the CIM compatibility of an Add-on. """ + import logging import pytest from .field_test_helper import FieldTestHelper diff --git a/pytest_splunk_addon/event_ingestors/hec_metric_ingestor.py b/pytest_splunk_addon/event_ingestors/hec_metric_ingestor.py index 570158057..f05f7c657 100644 --- a/pytest_splunk_addon/event_ingestors/hec_metric_ingestor.py +++ b/pytest_splunk_addon/event_ingestors/hec_metric_ingestor.py @@ -17,6 +17,7 @@ HEC Event Ingestor class for Metric data. Indextime tests of Metric data will be covered in upcoming versions of the plugin. It is not supported in current version. """ + from .base_event_ingestor import EventIngestor import requests import time diff --git a/pytest_splunk_addon/fields_tests/__init__.py b/pytest_splunk_addon/fields_tests/__init__.py index db8b553e4..512010024 100644 --- a/pytest_splunk_addon/fields_tests/__init__.py +++ b/pytest_splunk_addon/fields_tests/__init__.py @@ -15,7 +15,7 @@ # # -*- coding: utf-8 -*- """ -Test generation mechanism to verify the field extractions of an Add-on +Test generation mechanism to verify the field extractions of an Add-on """ from .field_bank import FieldBank diff --git a/pytest_splunk_addon/fields_tests/field_bank.py b/pytest_splunk_addon/fields_tests/field_bank.py index fb7206a4b..f1049ffd6 100644 --- a/pytest_splunk_addon/fields_tests/field_bank.py +++ b/pytest_splunk_addon/fields_tests/field_bank.py @@ -17,6 +17,7 @@ """ To enhance the test cases while verifying the field extractions. """ + import json from ..addon_parser import Field diff --git a/pytest_splunk_addon/fields_tests/test_generator.py b/pytest_splunk_addon/fields_tests/test_generator.py index c31f4eab5..8bb9e148e 100644 --- a/pytest_splunk_addon/fields_tests/test_generator.py +++ b/pytest_splunk_addon/fields_tests/test_generator.py @@ -18,6 +18,7 @@ Module include class to generate the test cases to test the knowledge objects of an Add-on. """ + import pytest import logging from itertools import chain @@ -27,7 +28,6 @@ from ..utilities import xml_event_parser from ..utils import EP_COMPATIBLE_INPUT_TYPES - LOGGER = logging.getLogger("pytest-splunk-addon") diff --git a/pytest_splunk_addon/fields_tests/test_templates.py b/pytest_splunk_addon/fields_tests/test_templates.py index 6aa288f9a..13ee4bfd5 100644 --- a/pytest_splunk_addon/fields_tests/test_templates.py +++ b/pytest_splunk_addon/fields_tests/test_templates.py @@ -17,6 +17,7 @@ """ Includes the test scenarios to check the field extractions of an Add-on. """ + import pprint import logging import pytest diff --git a/pytest_splunk_addon/index_tests/__init__.py b/pytest_splunk_addon/index_tests/__init__.py index c1b8bb722..21050bb48 100644 --- a/pytest_splunk_addon/index_tests/__init__.py +++ b/pytest_splunk_addon/index_tests/__init__.py @@ -14,7 +14,7 @@ # limitations under the License. # """ -Test generation mechanism to verify the index time extractions of an Add-on +Test generation mechanism to verify the index time extractions of an Add-on """ from .test_templates import IndexTimeTestTemplate diff --git a/pytest_splunk_addon/index_tests/test_generator.py b/pytest_splunk_addon/index_tests/test_generator.py index c741529a1..22574c1b8 100644 --- a/pytest_splunk_addon/index_tests/test_generator.py +++ b/pytest_splunk_addon/index_tests/test_generator.py @@ -145,9 +145,9 @@ def generate_line_breaker_tests(self, tokenized_events): line_breaker_params[event.sample_name] = {} if not line_breaker_params[event.sample_name].get("sourcetype"): - line_breaker_params[event.sample_name][ - "sourcetype" - ] = self.get_sourcetype(event) + line_breaker_params[event.sample_name]["sourcetype"] = ( + self.get_sourcetype(event) + ) if not line_breaker_params[event.sample_name].get("expected_event_count"): if event.metadata.get("input_type") not in [ diff --git a/pytest_splunk_addon/index_tests/test_templates.py b/pytest_splunk_addon/index_tests/test_templates.py index a9b05a917..0054f16bc 100644 --- a/pytest_splunk_addon/index_tests/test_templates.py +++ b/pytest_splunk_addon/index_tests/test_templates.py @@ -16,6 +16,7 @@ """ Includes the test scenarios to check the index time properties of an Add-on. """ + import logging import pytest import copy diff --git a/pytest_splunk_addon/sample_generation/pytest_splunk_addon_data_parser.py b/pytest_splunk_addon/sample_generation/pytest_splunk_addon_data_parser.py index f5da871ba..a40632aad 100644 --- a/pytest_splunk_addon/sample_generation/pytest_splunk_addon_data_parser.py +++ b/pytest_splunk_addon/sample_generation/pytest_splunk_addon_data_parser.py @@ -191,7 +191,7 @@ def test_unicode_char(filename): """ invalid = False pattern = re.compile( - "[\u200B-\u200E\uFEFF\u202c\u202D\u2063\u2062]" + "[\u200b-\u200e\ufeff\u202c\u202d\u2063\u2062]" ) # zero width characters error_message = "" for i, line in enumerate(open(filename)): diff --git a/pytest_splunk_addon/sample_generation/rule.py b/pytest_splunk_addon/sample_generation/rule.py index 34cb9663c..75748b807 100644 --- a/pytest_splunk_addon/sample_generation/rule.py +++ b/pytest_splunk_addon/sample_generation/rule.py @@ -16,6 +16,7 @@ """ Provides Rules for all possible replacements for tokens. """ + import re import string import uuid diff --git a/pytest_splunk_addon/sample_generation/sample_event.py b/pytest_splunk_addon/sample_generation/sample_event.py index 59ac0dedd..7a12a48bf 100644 --- a/pytest_splunk_addon/sample_generation/sample_event.py +++ b/pytest_splunk_addon/sample_generation/sample_event.py @@ -384,18 +384,18 @@ def update_requirement_test_field(self, field, token, token_values): if token in value: if isinstance(token_values, list): if len(token_values) == 1: - self.requirement_test_data[key][ - field_name - ] = value.replace(token, str(token_values[0].key)) + self.requirement_test_data[key][field_name] = ( + value.replace(token, str(token_values[0].key)) + ) else: self.requirement_test_data[key][field_name] = [ value.replace(token, str(token_value.key)) for token_value in token_values ] else: - self.requirement_test_data[key][ - field_name - ] = value.replace(token, str(token_values.key)) + self.requirement_test_data[key][field_name] = ( + value.replace(token, str(token_values.key)) + ) def get_key_fields(self): """ diff --git a/pytest_splunk_addon/sample_generation/sample_stanza.py b/pytest_splunk_addon/sample_generation/sample_stanza.py index ff0d2968c..377c62033 100644 --- a/pytest_splunk_addon/sample_generation/sample_stanza.py +++ b/pytest_splunk_addon/sample_generation/sample_stanza.py @@ -434,9 +434,9 @@ def populate_requirement_test_data(event): ) if type(missing_recommended_fields) != list: missing_recommended_fields = [missing_recommended_fields] - requirement_test_data[ - "missing_recommended_fields" - ] = missing_recommended_fields + requirement_test_data["missing_recommended_fields"] = ( + missing_recommended_fields + ) defined_exceptions = cim.get("exceptions") or {} exceptions = {} diff --git a/pytest_splunk_addon/splunk.py b/pytest_splunk_addon/splunk.py index a5c434f8d..4f41569d1 100644 --- a/pytest_splunk_addon/splunk.py +++ b/pytest_splunk_addon/splunk.py @@ -192,7 +192,7 @@ def pytest_addoption(parser): "Relative or absolute path can be provided." "Json files are expected in the directory." "Json files must follow the schema mentioned in DatamodelSchema.json" - "pytest-splunk-addon\pytest_splunk_addon\standard_lib\cim_tests\DatamodelSchema.json" + r"pytest-splunk-addon\pytest_splunk_addon\standard_lib\cim_tests\DatamodelSchema.json" ), ) group.addoption( diff --git a/pytest_splunk_addon/utilities/junit_parser.py b/pytest_splunk_addon/utilities/junit_parser.py index 8ad4ae321..4d50f67bf 100644 --- a/pytest_splunk_addon/utilities/junit_parser.py +++ b/pytest_splunk_addon/utilities/junit_parser.py @@ -16,6 +16,7 @@ """ Parse the Junit XML report and convert it to required format """ + from ..cim_compliance import CIMReportGenerator import argparse import errno diff --git a/pytest_splunk_addon/utilities/xml_event_parser.py b/pytest_splunk_addon/utilities/xml_event_parser.py index c6d569660..f5c6139be 100644 --- a/pytest_splunk_addon/utilities/xml_event_parser.py +++ b/pytest_splunk_addon/utilities/xml_event_parser.py @@ -17,7 +17,6 @@ import re from collections import OrderedDict - supported_headers = OrderedDict( [ ( diff --git a/tests/e2e/constants.py b/tests/e2e/constants.py index 5f3eff38b..2a9dfd6eb 100644 --- a/tests/e2e/constants.py +++ b/tests/e2e/constants.py @@ -2,6 +2,7 @@ """ Define the TA_fiction add-on passed test case list. """ + TA_FICTION_PASSED = [ "*test_splunk_app_fiction.py::Test_App::test_events_with_untokenised_values PASSED*", "*test_splunk_app_fiction.py::Test_App::test_splunk_internal_errors PASSED*", diff --git a/tests/e2e/test_splunk_addon.py b/tests/e2e/test_splunk_addon.py index 1a79cc0ff..6ccd9fe42 100644 --- a/tests/e2e/test_splunk_addon.py +++ b/tests/e2e/test_splunk_addon.py @@ -126,15 +126,13 @@ def test_splunk_connection_docker(testdir, request): def test_splunk_app_fiction(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_fiction"), @@ -174,15 +172,13 @@ def empty_method(): def test_splunk_fiction_indextime_wrong_hec_token(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_fiction_indextime"), @@ -229,15 +225,13 @@ def empty_method(): def test_splunk_app_broken(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_broken"), @@ -286,15 +280,13 @@ def empty_method(): def test_splunk_app_cim_fiction(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_CIM_Fiction"), @@ -340,15 +332,13 @@ def empty_method(): def test_splunk_app_cim_broken(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_CIM_Broken"), @@ -397,15 +387,13 @@ def empty_method(): def test_splunk_fiction_indextime(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_fiction_indextime"), @@ -453,15 +441,13 @@ def empty_method(): def test_splunk_fiction_indextime_broken(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join( @@ -509,15 +495,13 @@ def empty_method(): @pytest.mark.docker @pytest.mark.splunk_setup_fixture def test_splunk_setup_fixture(testdir, request): - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) setup_test_dir(testdir) SampleGenerator.clean_samples() Rule.clean_rules() @@ -549,14 +533,12 @@ def empty_method(): def test_splunk_app_req(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_transition_from_req"), @@ -604,14 +586,12 @@ def empty_method(): def test_splunk_app_req_broken(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_req_broken"), @@ -659,14 +639,12 @@ def empty_method(): def test_splunk_app_req(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_transition_from_req"), @@ -717,14 +695,12 @@ def test_splunk_cim_model(testdir, request): scr_ip contains ~35 diff advanced form of ipv6 combinations that are tested in this case. We are also checking cim fields extraction condtions of Change Datamodel. """ - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_cim_addon"), @@ -774,14 +750,12 @@ def empty_method(): def test_infinite_loop_in_ingest_data_fixture(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_fiction_indextime"), @@ -819,15 +793,13 @@ def empty_method(): def test_splunk_app_fiction_with_ep(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_fiction"), @@ -869,14 +841,12 @@ def empty_method(): def test_splunk_app_req_with_ep(testdir, request): """Make sure that pytest accepts our fixture.""" - testdir.makepyfile( - """ + testdir.makepyfile(""" from pytest_splunk_addon.standard_lib.addon_basic import Basic class Test_App(Basic): def empty_method(): pass - """ - ) + """) shutil.copytree( os.path.join(testdir.request.fspath.dirname, "addons/TA_transition_from_req"), diff --git a/tests/unit/tests_standard_lib/test_addon_parser/test_parser_cache.py b/tests/unit/tests_standard_lib/test_addon_parser/test_parser_cache.py index beb387b29..8c5b98020 100644 --- a/tests/unit/tests_standard_lib/test_addon_parser/test_parser_cache.py +++ b/tests/unit/tests_standard_lib/test_addon_parser/test_parser_cache.py @@ -16,6 +16,7 @@ """ Unit tests for ParserCache. """ + import os import tempfile from unittest.mock import patch diff --git a/tests/unit/tests_standard_lib/test_cim_compliance/test_markdown_report.py b/tests/unit/tests_standard_lib/test_cim_compliance/test_markdown_report.py index 5fd34cde5..8729c364e 100644 --- a/tests/unit/tests_standard_lib/test_cim_compliance/test_markdown_report.py +++ b/tests/unit/tests_standard_lib/test_cim_compliance/test_markdown_report.py @@ -4,7 +4,6 @@ MarkDownReport, ) - MARKDOWN_STR = "init string" NOTE_STR = "init note" diff --git a/tests/unit/tests_standard_lib/test_cim_tests/test_field_test_helper.py b/tests/unit/tests_standard_lib/test_cim_tests/test_field_test_helper.py index e3f10625b..dd848dab6 100644 --- a/tests/unit/tests_standard_lib/test_cim_tests/test_field_test_helper.py +++ b/tests/unit/tests_standard_lib/test_cim_tests/test_field_test_helper.py @@ -4,7 +4,6 @@ from pytest_splunk_addon.cim_tests.field_test_helper import FieldTestHelper from pytest_splunk_addon.utilities.log_helper import get_table_output - field = namedtuple( "Field", ["name", "condition", "get_stats_query", "gen_validity_query", "get_properties"], diff --git a/tests/unit/tests_standard_lib/test_cim_tests/test_json_schema.py b/tests/unit/tests_standard_lib/test_cim_tests/test_json_schema.py index 8476515fb..5d13a56d6 100644 --- a/tests/unit/tests_standard_lib/test_cim_tests/test_json_schema.py +++ b/tests/unit/tests_standard_lib/test_cim_tests/test_json_schema.py @@ -3,7 +3,6 @@ from collections import namedtuple from pytest_splunk_addon.cim_tests.json_schema import JSONSchema - error = namedtuple("ValidationError", ["path", "instance", "message"]) diff --git a/tests/unit/tests_standard_lib/test_cim_tests/test_splunk_cim_models_contract.py b/tests/unit/tests_standard_lib/test_cim_tests/test_splunk_cim_models_contract.py index 6599a1b2a..40729705f 100644 --- a/tests/unit/tests_standard_lib/test_cim_tests/test_splunk_cim_models_contract.py +++ b/tests/unit/tests_standard_lib/test_cim_tests/test_splunk_cim_models_contract.py @@ -24,6 +24,7 @@ If any of these tests fail after upgrading splunk-cim-models, the corresponding PSA import site must be updated to match the new API. """ + import json import os import sys @@ -32,7 +33,6 @@ import pytest - # --------------------------------------------------------------------------- # Helpers # --------------------------------------------------------------------------- diff --git a/tests/unit/tests_standard_lib/test_event_ingestors/test_hec_event_metric_raw_ingestor.py b/tests/unit/tests_standard_lib/test_event_ingestors/test_hec_event_metric_raw_ingestor.py index 247156d72..3e3f77cee 100644 --- a/tests/unit/tests_standard_lib/test_event_ingestors/test_hec_event_metric_raw_ingestor.py +++ b/tests/unit/tests_standard_lib/test_event_ingestors/test_hec_event_metric_raw_ingestor.py @@ -10,7 +10,6 @@ ) from urllib.parse import unquote - HEC_URI = "https://127.0.0.1:55238/services/collector" HEADERS = {"Authorization": "Splunk 9b741d03-43e9-4164-908b-e09102327d22"} diff --git a/tests/unit/tests_standard_lib/test_event_ingestors/test_ingestor_helper.py b/tests/unit/tests_standard_lib/test_event_ingestors/test_ingestor_helper.py index 36d616559..a414d98ca 100644 --- a/tests/unit/tests_standard_lib/test_event_ingestors/test_ingestor_helper.py +++ b/tests/unit/tests_standard_lib/test_event_ingestors/test_ingestor_helper.py @@ -3,7 +3,6 @@ from unittest.mock import patch, MagicMock, call import pytest_splunk_addon.event_ingestors as event_ingestors - EVENT_INGESTOR_PATH = "pytest_splunk_addon.event_ingestors" HEC_EVENT_INGESTOR_RETURN_VALUE = "hec_event_ingestor_return_value" HEC_RAW_EVENT_INGESTOR_RETURN_VALUE = "hec_raw_event_ingestor_return_value" diff --git a/tests/unit/tests_standard_lib/test_index_tests/test_test_generator.py b/tests/unit/tests_standard_lib/test_index_tests/test_test_generator.py index 1901a1365..b0859cb97 100644 --- a/tests/unit/tests_standard_lib/test_index_tests/test_test_generator.py +++ b/tests/unit/tests_standard_lib/test_index_tests/test_test_generator.py @@ -105,16 +105,18 @@ def test_generate_tests_triggers_generate_params( } with patch_object( "get_hosts", - side_effect=lambda event: event.metadata["host"] - if type(event.metadata["host"]) == list - else [event.metadata["host"]], + side_effect=lambda event: ( + event.metadata["host"] + if type(event.metadata["host"]) == list + else [event.metadata["host"]] + ), ), patch_object( "add_host_prefix", - side_effect=lambda host_prefix, hosts: [ - host_prefix + str(host) for host in hosts - ] - if type(hosts) == list - else [host_prefix + str(hosts)], + side_effect=lambda host_prefix, hosts: ( + [host_prefix + str(host) for host in hosts] + if type(hosts) == list + else [host_prefix + str(hosts)] + ), ), patch_object( "generate_params", side_effect=lambda event, ids, hosts: ((event, ids, hosts) for x in range(1)), @@ -193,9 +195,11 @@ def test_generate_line_breaker_tests(mock_object): side_effect=lambda event: event.metadata["sourcetype"], ), patch_object( "get_hosts", - side_effect=lambda event: event.metadata["host"] - if type(event.metadata["host"]) == list - else [event.metadata["host"]], + side_effect=lambda event: ( + event.metadata["host"] + if type(event.metadata["host"]) == list + else [event.metadata["host"]] + ), ), patch.object( pytest, "param", side_effect=lambda x, id: (x, id) ) as param_mock: diff --git a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_e2e_flow.py b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_e2e_flow.py index 24fe93857..6bb064eef 100644 --- a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_e2e_flow.py +++ b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_e2e_flow.py @@ -3,6 +3,7 @@ End-to-End tests for UUID flow through the entire pytest-splunk-addon pipeline. Tests Priority #2: End-to-End UUID Flow Tests """ + import pytest import json import tempfile diff --git a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_generation.py b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_generation.py index 26c2b2ab9..7b2800f43 100644 --- a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_generation.py +++ b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_generation.py @@ -3,6 +3,7 @@ Unit tests for UUID generation and uniqueness in sample events. Tests Priority #1: UUID Generation & Uniqueness Tests """ + import pytest import uuid from unittest.mock import patch, MagicMock diff --git a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_tokenization_timing.py b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_tokenization_timing.py index b30884b90..a5e8de1cf 100644 --- a/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_tokenization_timing.py +++ b/tests/unit/tests_standard_lib/tests_sample_generation/test_uuid_tokenization_timing.py @@ -2,6 +2,7 @@ """ Test for UUID timing fix - ensures UUIDs are assigned per finalized event after tokenization. """ + import pytest import tempfile import os