UnobservableCommandTest

Feature for testing unobservable commands.

Methods

  • command_without_parameters_and_responses(self) -> None

    A command that takes no parameters and returns no responses.

  • convert_integer_to_string(self, integer : int) -> str

    A command that takes one integer parameter and returns its string representation.

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      integer
      Type
      int
      Default
      Description

    Response

    Type
    str
    Description

  • join_integer_and_string(self, integer : int, string : str) -> str

    A command which takes an integer and a string parameter and returns a string with both joined (e.g. "123abc")

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      integer
      Type
      int
      Default
      Description

    • Name
      string
      Type
      str
      Default
      Description

    Response

    Type
    str
    Description

  • split_string_after_first_character(self, string : str) -> tuple[str, str]

    A command which splits a given string after its first character. Returns empty parts if the input was too short.

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      string
      Type
      str
      Default
      Description

    Response

    Type
    tuple[str, str]
    Description

  • __init__(
      self,
      id : str,
      name : str,
    ) -> None

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      client
      Type
      Client
      Default
      Description

    • Name
      id
      Type
      str
      Default
      = ''
      Description

    • Name
      name
      Type
      str
      Default
      = ''
      Description

    • Name
      actions
      Type
      dict[str, Action]
      Default
      Description

  • __getattr__(self, name : str) -> Action

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      name
      Type
      str
      Default
      Description

    Response

    Type
    Action
    Description

  • __getitem__(self, name : str) -> Action

    Parameters

    • Name
      self
      Type
      Default
      Description

    • Name
      name
      Type
      str
      Default
      Description

    Response

    Type
    Action
    Description

Attributes

  • Name
    client
    Type
    Client
    Value

    = None

    Description

  • Name
    id
    Type
    str
    Value

    = ''

    Description

  • Name
    name
    Type
    str
    Value

    = ''

    Description

  • Name
    actions
    Type
    dict[str, Action]
    Value

    = dataclasses.field(repr=False, default_factory=dict)

    Description

Copyright © 2024