# Path: apiritif/utils.py
# VERSION = "1.1.3"
# def get_trace(error):
# def graceful():
# def headers_as_text(headers_dict):
# def shorten(string, upto, end_with="..."):
# def assert_regexp(regex, text, match=False, msg=None):
# def assert_not_regexp(regex, text, match=False, msg=None):
# class NormalShutdown(BaseException):


import os
import sys
from abc import ABCMeta, abstractmethod
from importlib import import_module
from pathlib import Path
from pkgutil import iter_modules
from apiritif.utils import log
    TEST_CASE_START = 'test_case_start'
    TEST_CASE_STOP = 'test_case_stop'

    def __init__(self, **kwargs):
        pass

    @abstractmethod
    def startup(self):
        pass

    @abstractmethod
    def handle(self, session_id, action_type, action):
        pass

    @abstractmethod
    def finalize(self):
        pass


class ActionHandlerFactory:
    registry = {}

    @classmethod
    def register(cls, name):
        def inner_wrapper(wrapped_class):
            cls.registry[name] = wrapped_class
            return wrapped_class

        return inner_wrapper


# Path: apiritif/utils.py
# VERSION = "1.1.3"
# def get_trace(error):
# def graceful():
# def headers_as_text(headers_dict):
# def shorten(string, upto, end_with="..."):
# def assert_regexp(regex, text, match=False, msg=None):
# def assert_not_regexp(regex, text, match=False, msg=None):
# class NormalShutdown(BaseException):


# Path: apiritif/action_plugins.py
import os
import sys
from abc import ABCMeta, abstractmethod
from importlib import import_module
from pathlib import Path
from pkgutil import iter_modules
from apiritif.utils import log

    TEST_CASE_START = 'test_case_start'
    TEST_CASE_STOP = 'test_case_stop'

    def __init__(self, **kwargs):
        pass

    @abstractmethod
    def startup(self):
        pass

    @abstractmethod
    def handle(self, session_id, action_type, action):
        pass

    @abstractmethod
    def finalize(self):
        pass


class ActionHandlerFactory:
    registry = {}

    @classmethod
    def register(cls, name):
        def inner_wrapper(wrapped_class):
            cls.registry[name] = wrapped_class
            return wrapped_class

        return inner_wrapper


    @classmethod