steps.api.utils.custom_exceptions ================================= .. py:module:: steps.api.utils.custom_exceptions Attributes ---------- .. autoapisummary:: steps.api.utils.custom_exceptions.FORBIDDEN_KEYWORDS Exceptions ---------- .. autoapisummary:: steps.api.utils.custom_exceptions.AWrongStatus steps.api.utils.custom_exceptions.ShouldHaveSucceeded steps.api.utils.custom_exceptions.ShouldHaveFailed steps.api.utils.custom_exceptions.WrongErrorCode steps.api.utils.custom_exceptions.WrongSuccessCode steps.api.utils.custom_exceptions.ServerError steps.api.utils.custom_exceptions.ASchemaError steps.api.utils.custom_exceptions.DefaultSchemaIsUsed steps.api.utils.custom_exceptions.MissingEndpoint steps.api.utils.custom_exceptions.MissingSchema steps.api.utils.custom_exceptions.UnrespectedSchema steps.api.utils.custom_exceptions.InvalidFieldInSchema steps.api.utils.custom_exceptions.SchemaError steps.api.utils.custom_exceptions.ForbiddenKeyword Functions --------- .. autoapisummary:: steps.api.utils.custom_exceptions.get_status_exception steps.api.utils.custom_exceptions.check_forbidden_keyword Module Contents --------------- .. py:exception:: AWrongStatus(expected_status: str, actual_status: str) Bases: :py:obj:`AssertionError`, :py:obj:`abc.ABC` Assertion failed. .. py:attribute:: expected_status .. py:attribute:: actual_status .. py:method:: get_message() -> str :abstractmethod: .. py:method:: is_raised() -> bool .. py:exception:: ShouldHaveSucceeded(expected_status: str, actual_status: str) Bases: :py:obj:`AWrongStatus` Assertion failed. .. py:method:: get_message() .. py:exception:: ShouldHaveFailed(expected_status: str, actual_status: str) Bases: :py:obj:`AWrongStatus` Assertion failed. .. py:method:: get_message() .. py:exception:: WrongErrorCode(expected_status: str, actual_status: str) Bases: :py:obj:`AWrongStatus` Assertion failed. .. py:method:: get_message() .. py:exception:: WrongSuccessCode(expected_status: str, actual_status: str) Bases: :py:obj:`AWrongStatus` Assertion failed. .. py:method:: get_message() .. py:exception:: ServerError(expected_status: str, actual_status: str) Bases: :py:obj:`AWrongStatus` Assertion failed. .. py:method:: get_message() .. py:exception:: ASchemaError(request, schema: str = None) Bases: :py:obj:`AssertionError`, :py:obj:`abc.ABC` Assertion failed. .. py:attribute:: endpoint .. py:attribute:: verb .. py:attribute:: status_code .. py:attribute:: api .. py:attribute:: schema :value: None .. py:method:: get_message() -> str :abstractmethod: .. py:exception:: DefaultSchemaIsUsed(request, schema: str = None) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:method:: get_message() .. py:exception:: MissingEndpoint(request, schema: str = None) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:method:: get_message() .. py:exception:: MissingSchema(request, schema: str = None) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:method:: get_message() .. py:exception:: UnrespectedSchema(request, schema: str, errors: list[str]) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:attribute:: errors .. py:method:: get_message() .. py:exception:: InvalidFieldInSchema(request, schema: str, fields: list[str]) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:attribute:: fields .. py:method:: get_message() .. py:exception:: SchemaError(request, schema: str, errors: list[str]) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:attribute:: errors .. py:method:: get_message() .. py:exception:: ForbiddenKeyword(request, schema: str, errors: list[str]) Bases: :py:obj:`ASchemaError` Assertion failed. .. py:attribute:: errors .. py:method:: get_message() .. py:data:: FORBIDDEN_KEYWORDS :value: ['foreign key', 'q_'] .. py:function:: get_status_exception(expected_status, actual_status) -> AWrongStatus .. py:function:: check_forbidden_keyword(my_obj) -> str