tests.integration package¶
Subpackages¶
- tests.integration.routes package
- Submodules
- tests.integration.routes.test_get_channel module
- tests.integration.routes.test_get_ims module
- tests.integration.routes.test_get_team module
- tests.integration.routes.test_get_user_v2 module
- tests.integration.routes.test_healthcheck module
- tests.integration.routes.test_interactive module
- tests.integration.routes.test_send_im module
- tests.integration.routes.test_slack_action module
- tests.integration.routes.test_slack_event module
- tests.integration.routes.test_slash_command module
- Module contents
Submodules¶
tests.integration.conftest module¶
-
class
tests.integration.conftest.
TestClient
(*args, **kwargs)¶ Bases:
flask.testing.FlaskClient
Overrides the default Flask test client to apply envoy headers so that the envoy checks pass.
-
open
(*args, **kwargs)¶ Takes the same arguments as the
EnvironBuilder
class with some additions: You can provide aEnvironBuilder
or a WSGI environment as only argument instead of theEnvironBuilder
arguments and two optional keyword arguments (as_tuple, buffered) that change the type of the return value or the way the application is executed.Changed in version 0.5: If a dict is provided as file in the dict for the data parameter the content type has to be called content_type now instead of mimetype. This change was made for consistency with
werkzeug.FileWrapper
.The follow_redirects parameter was added to
open()
.Additional parameters:
- Parameters
as_tuple – Returns a tuple in the form
(environ, result)
buffered – Set this to True to buffer the application run. This will automatically close the application for you as well.
follow_redirects – Set this to True if the Client should follow HTTP redirects.
-
-
class
tests.integration.conftest.
TestInternalClient
(*args, **kwargs)¶ Bases:
flask.testing.FlaskClient
Overrides the default Flask test client to apply internal envoy headers so that the authorization checks pass.
-
open
(*args, **kwargs)¶ Takes the same arguments as the
EnvironBuilder
class with some additions: You can provide aEnvironBuilder
or a WSGI environment as only argument instead of theEnvironBuilder
arguments and two optional keyword arguments (as_tuple, buffered) that change the type of the return value or the way the application is executed.Changed in version 0.5: If a dict is provided as file in the dict for the data parameter the content type has to be called content_type now instead of mimetype. This change was made for consistency with
werkzeug.FileWrapper
.The follow_redirects parameter was added to
open()
.Additional parameters:
- Parameters
as_tuple – Returns a tuple in the form
(environ, result)
buffered – Set this to True to buffer the application run. This will automatically close the application for you as well.
follow_redirects – Set this to True if the Client should follow HTTP redirects.
-
-
tests.integration.conftest.
client
() → werkzeug.test.Client¶ Returns a werkzeug compatible Flask test client for testing the full request to response flow for all Slack API related omnibot endpoints.
-
tests.integration.conftest.
instrument
(mocker: pytest_mock.plugin.MockerFixture) → unittest.mock.MagicMock¶
-
tests.integration.conftest.
internal_client
() → werkzeug.test.Client¶ Returns a werkzeug compatible Flask test client for testing the full request to response flow for all internal-related omnibot endpoints.
-
tests.integration.conftest.
queue
(mocker: pytest_mock.plugin.MockerFixture) → unittest.mock.MagicMock¶
-
tests.integration.conftest.
slack_api_call
(mocker: pytest_mock.plugin.MockerFixture) → unittest.mock.MagicMock¶