text: # -*- coding: utf-8 -*-
  # Copyright (c) 2020 Nekokatt
  #
  # Permission is hereby granted, free of charge, to any person obtaining a copy
  # of this software and associated documentation files (the "Software"), to deal
  # in the Software without restriction, including without limitation the rights
  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  # copies of the Software, and to permit persons to whom the Software is
  # furnished to do so, subject to the following conditions:
  #
  # The above copyright notice and this permission notice shall be included in all
  # copies or substantial portions of the Software.
  #
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  # SOFTWARE.
  
  import pytest
  
  from hikari.impl import special_endpoints
  from tests.hikari import hikari_test_helpers
  
  
  class TestTypingIndicator:
      @pytest.fixture()
      def typing_indicator(self):
          return hikari_test_helpers.mock_class_namespace(special_endpoints.TypingIndicator, init=False)
  
      def test___enter__(self, typing_indicator):
          # flake8 gets annoyed if we use "with" here so here's a hacky alternative
          with pytest.raises(TypeError, match=" is async-only, did you mean 'async with'?"):
              typing_indicator().__enter__()
  
      def test___exit__(self, typing_indicator):
          try:
              typing_indicator().__exit__(None, None, None)
          except AttributeError as exc:
              pytest.fail(exc)
  