We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Move `requests` to `testing` extra
I was inspecting starlight dependencies and was confused to see `requests` being required without any obvious reason.

I found #13 then, but I disagree with the resolution since I believe libs required for testing purposes should not be installed for normal use. Now it only one lib (with several dependencies), but imagine if more dependencies would be added for testing.

#### What I propose:
1. Move requests from required dependencies to `testing` extra (`pip install starlight[testing]`)
1. Remove import of `starlite.testing` from `starlite` package
2. When starlight is imported explicitly (`from starlight import testint`), check for requests installed. if not, raise `RuntimeError("To access starlight.testing install starlight with [testing] extra")`

How would `pyproject.toml` of end user look like:
```toml
[tool.poetry.dependencies]
python = "^3.10"
starlite = "^1.3.9"

[tool.poetry.dev-dependencies]
starlite = {extras = ["testing"], version = "*"}  # whatever version is installed + testing dependencies
pytest = "^5.2"
```


I can send a PR if changes are welcomed.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `starlite/__init__.py`
Content:
```
1 from starlite.datastructures import File, Redirect, State, Stream, Template
2 
3 from .app import Starlite
4 from .config import (
5     CacheConfig,
6     CORSConfig,
7     OpenAPIConfig,
8     StaticFilesConfig,
9     TemplateConfig,
10 )
11 from .connection import Request, WebSocket
12 from .controller import Controller
13 from .dto import DTOFactory
14 from .enums import (
15     HttpMethod,
16     MediaType,
17     OpenAPIMediaType,
18     RequestEncodingType,
19     ScopeType,
20 )
21 from .exceptions import (
22     HTTPException,
23     ImproperlyConfiguredException,
24     InternalServerException,
25     MissingDependencyException,
26     NotAuthorizedException,
27     NotFoundException,
28     PermissionDeniedException,
29     ServiceUnavailableException,
30     StarLiteException,
31     ValidationException,
32 )
33 from .handlers import (
34     ASGIRouteHandler,
35     BaseRouteHandler,
36     HTTPRouteHandler,
37     WebsocketRouteHandler,
38     asgi,
39     delete,
40     get,
41     patch,
42     post,
43     put,
44     route,
45     websocket,
46 )
47 from .logging import LoggingConfig, QueueListenerHandler
48 from .middleware import AbstractAuthenticationMiddleware, AuthenticationResult
49 from .openapi.controller import OpenAPIController
50 from .params import Body, Dependency, Parameter
51 from .plugins import PluginProtocol
52 from .provide import Provide
53 from .response import Response
54 from .router import Router
55 from .routes import BaseRoute, HTTPRoute, WebSocketRoute
56 from .testing import TestClient, create_test_client, create_test_request
57 from .types import MiddlewareProtocol, Partial, ResponseHeader
58 
59 __all__ = [
60     "ASGIRouteHandler",
61     "AbstractAuthenticationMiddleware",
62     "AuthenticationResult",
63     "BaseRoute",
64     "BaseRouteHandler",
65     "Body",
66     "CORSConfig",
67     "CacheConfig",
68     "Controller",
69     "Dependency",
70     "DTOFactory",
71     "File",
72     "HTTPException",
73     "HTTPRoute",
74     "HTTPRouteHandler",
75     "HttpMethod",
76     "ImproperlyConfiguredException",
77     "InternalServerException",
78     "LoggingConfig",
79     "MediaType",
80     "MiddlewareProtocol",
81     "MissingDependencyException",
82     "NotAuthorizedException",
83     "NotFoundException",
84     "OpenAPIConfig",
85     "OpenAPIController",
86     "OpenAPIMediaType",
87     "Parameter",
88     "Partial",
89     "PermissionDeniedException",
90     "PluginProtocol",
91     "Provide",
92     "QueueListenerHandler",
93     "Redirect",
94     "Request",
95     "RequestEncodingType",
96     "Response",
97     "ResponseHeader",
98     "Router",
99     "ScopeType",
100     "ServiceUnavailableException",
101     "StarLiteException",
102     "Starlite",
103     "State",
104     "StaticFilesConfig",
105     "Stream",
106     "Template",
107     "TemplateConfig",
108     "TestClient",
109     "ValidationException",
110     "WebSocket",
111     "WebSocketRoute",
112     "WebsocketRouteHandler",
113     "asgi",
114     "create_test_client",
115     "create_test_request",
116     "delete",
117     "get",
118     "patch",
119     "post",
120     "put",
121     "route",
122     "websocket",
123 ]
124
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/starlite/__init__.py b/starlite/__init__.py
--- a/starlite/__init__.py
+++ b/starlite/__init__.py
@@ -1,3 +1,5 @@
+from typing import TYPE_CHECKING, Any
+
 from starlite.datastructures import File, Redirect, State, Stream, Template
 
 from .app import Starlite
@@ -53,9 +55,12 @@
 from .response import Response
 from .router import Router
 from .routes import BaseRoute, HTTPRoute, WebSocketRoute
-from .testing import TestClient, create_test_client, create_test_request
 from .types import MiddlewareProtocol, Partial, ResponseHeader
 
+if TYPE_CHECKING:
+    from .testing import TestClient, create_test_client, create_test_request
+
+
 __all__ = [
     "ASGIRouteHandler",
     "AbstractAuthenticationMiddleware",
@@ -121,3 +126,17 @@
     "route",
     "websocket",
 ]
+
+_dynamic_imports = {"TestClient", "create_test_client", "create_test_request"}
+
+
+# pylint: disable=import-outside-toplevel
+def __getattr__(name: str) -> Any:
+    """Provide lazy importing as per https://peps.python.org/pep-0562/"""
+    if name not in _dynamic_imports:
+        raise AttributeError(f"Module {__package__} has no attribute {name}")
+
+    from . import testing
+
+    attr = globals()[name] = getattr(testing, name)
+    return attr

{"golden_diff": "diff --git a/starlite/__init__.py b/starlite/__init__.py\n--- a/starlite/__init__.py\n+++ b/starlite/__init__.py\n@@ -1,3 +1,5 @@\n+from typing import TYPE_CHECKING, Any\n+\n from starlite.datastructures import File, Redirect, State, Stream, Template\n \n from .app import Starlite\n@@ -53,9 +55,12 @@\n from .response import Response\n from .router import Router\n from .routes import BaseRoute, HTTPRoute, WebSocketRoute\n-from .testing import TestClient, create_test_client, create_test_request\n from .types import MiddlewareProtocol, Partial, ResponseHeader\n \n+if TYPE_CHECKING:\n+    from .testing import TestClient, create_test_client, create_test_request\n+\n+\n __all__ = [\n     \"ASGIRouteHandler\",\n     \"AbstractAuthenticationMiddleware\",\n@@ -121,3 +126,17 @@\n     \"route\",\n     \"websocket\",\n ]\n+\n+_dynamic_imports = {\"TestClient\", \"create_test_client\", \"create_test_request\"}\n+\n+\n+# pylint: disable=import-outside-toplevel\n+def __getattr__(name: str) -> Any:\n+    \"\"\"Provide lazy importing as per https://peps.python.org/pep-0562/\"\"\"\n+    if name not in _dynamic_imports:\n+        raise AttributeError(f\"Module {__package__} has no attribute {name}\")\n+\n+    from . import testing\n+\n+    attr = globals()[name] = getattr(testing, name)\n+    return attr\n", "issue": "Move `requests` to `testing` extra\nI was inspecting starlight dependencies and was confused to see `requests` being required without any obvious reason.\r\n\r\nI found #13 then, but I disagree with the resolution since I believe libs required for testing purposes should not be installed for normal use. Now it only one lib (with several dependencies), but imagine if more dependencies would be added for testing.\r\n\r\n#### What I propose:\r\n1. Move requests from required dependencies to `testing` extra (`pip install starlight[testing]`)\r\n1. Remove import of `starlite.testing` from `starlite` package\r\n2. When starlight is imported explicitly (`from starlight import testint`), check for requests installed. if not, raise `RuntimeError(\"To access starlight.testing install starlight with [testing] extra\")`\r\n\r\nHow would `pyproject.toml` of end user look like:\r\n```toml\r\n[tool.poetry.dependencies]\r\npython = \"^3.10\"\r\nstarlite = \"^1.3.9\"\r\n\r\n[tool.poetry.dev-dependencies]\r\nstarlite = {extras = [\"testing\"], version = \"*\"}  # whatever version is installed + testing dependencies\r\npytest = \"^5.2\"\r\n```\r\n\r\n\r\nI can send a PR if changes are welcomed.\n", "before_files": [{"content": "from starlite.datastructures import File, Redirect, State, Stream, Template\n\nfrom .app import Starlite\nfrom .config import (\n    CacheConfig,\n    CORSConfig,\n    OpenAPIConfig,\n    StaticFilesConfig,\n    TemplateConfig,\n)\nfrom .connection import Request, WebSocket\nfrom .controller import Controller\nfrom .dto import DTOFactory\nfrom .enums import (\n    HttpMethod,\n    MediaType,\n    OpenAPIMediaType,\n    RequestEncodingType,\n    ScopeType,\n)\nfrom .exceptions import (\n    HTTPException,\n    ImproperlyConfiguredException,\n    InternalServerException,\n    MissingDependencyException,\n    NotAuthorizedException,\n    NotFoundException,\n    PermissionDeniedException,\n    ServiceUnavailableException,\n    StarLiteException,\n    ValidationException,\n)\nfrom .handlers import (\n    ASGIRouteHandler,\n    BaseRouteHandler,\n    HTTPRouteHandler,\n    WebsocketRouteHandler,\n    asgi,\n    delete,\n    get,\n    patch,\n    post,\n    put,\n    route,\n    websocket,\n)\nfrom .logging import LoggingConfig, QueueListenerHandler\nfrom .middleware import AbstractAuthenticationMiddleware, AuthenticationResult\nfrom .openapi.controller import OpenAPIController\nfrom .params import Body, Dependency, Parameter\nfrom .plugins import PluginProtocol\nfrom .provide import Provide\nfrom .response import Response\nfrom .router import Router\nfrom .routes import BaseRoute, HTTPRoute, WebSocketRoute\nfrom .testing import TestClient, create_test_client, create_test_request\nfrom .types import MiddlewareProtocol, Partial, ResponseHeader\n\n__all__ = [\n    \"ASGIRouteHandler\",\n    \"AbstractAuthenticationMiddleware\",\n    \"AuthenticationResult\",\n    \"BaseRoute\",\n    \"BaseRouteHandler\",\n    \"Body\",\n    \"CORSConfig\",\n    \"CacheConfig\",\n    \"Controller\",\n    \"Dependency\",\n    \"DTOFactory\",\n    \"File\",\n    \"HTTPException\",\n    \"HTTPRoute\",\n    \"HTTPRouteHandler\",\n    \"HttpMethod\",\n    \"ImproperlyConfiguredException\",\n    \"InternalServerException\",\n    \"LoggingConfig\",\n    \"MediaType\",\n    \"MiddlewareProtocol\",\n    \"MissingDependencyException\",\n    \"NotAuthorizedException\",\n    \"NotFoundException\",\n    \"OpenAPIConfig\",\n    \"OpenAPIController\",\n    \"OpenAPIMediaType\",\n    \"Parameter\",\n    \"Partial\",\n    \"PermissionDeniedException\",\n    \"PluginProtocol\",\n    \"Provide\",\n    \"QueueListenerHandler\",\n    \"Redirect\",\n    \"Request\",\n    \"RequestEncodingType\",\n    \"Response\",\n    \"ResponseHeader\",\n    \"Router\",\n    \"ScopeType\",\n    \"ServiceUnavailableException\",\n    \"StarLiteException\",\n    \"Starlite\",\n    \"State\",\n    \"StaticFilesConfig\",\n    \"Stream\",\n    \"Template\",\n    \"TemplateConfig\",\n    \"TestClient\",\n    \"ValidationException\",\n    \"WebSocket\",\n    \"WebSocketRoute\",\n    \"WebsocketRouteHandler\",\n    \"asgi\",\n    \"create_test_client\",\n    \"create_test_request\",\n    \"delete\",\n    \"get\",\n    \"patch\",\n    \"post\",\n    \"put\",\n    \"route\",\n    \"websocket\",\n]\n", "path": "starlite/__init__.py"}], "after_files": [{"content": "from typing import TYPE_CHECKING, Any\n\nfrom starlite.datastructures import File, Redirect, State, Stream, Template\n\nfrom .app import Starlite\nfrom .config import (\n    CacheConfig,\n    CORSConfig,\n    OpenAPIConfig,\n    StaticFilesConfig,\n    TemplateConfig,\n)\nfrom .connection import Request, WebSocket\nfrom .controller import Controller\nfrom .dto import DTOFactory\nfrom .enums import (\n    HttpMethod,\n    MediaType,\n    OpenAPIMediaType,\n    RequestEncodingType,\n    ScopeType,\n)\nfrom .exceptions import (\n    HTTPException,\n    ImproperlyConfiguredException,\n    InternalServerException,\n    MissingDependencyException,\n    NotAuthorizedException,\n    NotFoundException,\n    PermissionDeniedException,\n    ServiceUnavailableException,\n    StarLiteException,\n    ValidationException,\n)\nfrom .handlers import (\n    ASGIRouteHandler,\n    BaseRouteHandler,\n    HTTPRouteHandler,\n    WebsocketRouteHandler,\n    asgi,\n    delete,\n    get,\n    patch,\n    post,\n    put,\n    route,\n    websocket,\n)\nfrom .logging import LoggingConfig, QueueListenerHandler\nfrom .middleware import AbstractAuthenticationMiddleware, AuthenticationResult\nfrom .openapi.controller import OpenAPIController\nfrom .params import Body, Dependency, Parameter\nfrom .plugins import PluginProtocol\nfrom .provide import Provide\nfrom .response import Response\nfrom .router import Router\nfrom .routes import BaseRoute, HTTPRoute, WebSocketRoute\nfrom .types import MiddlewareProtocol, Partial, ResponseHeader\n\nif TYPE_CHECKING:\n    from .testing import TestClient, create_test_client, create_test_request\n\n\n__all__ = [\n    \"ASGIRouteHandler\",\n    \"AbstractAuthenticationMiddleware\",\n    \"AuthenticationResult\",\n    \"BaseRoute\",\n    \"BaseRouteHandler\",\n    \"Body\",\n    \"CORSConfig\",\n    \"CacheConfig\",\n    \"Controller\",\n    \"Dependency\",\n    \"DTOFactory\",\n    \"File\",\n    \"HTTPException\",\n    \"HTTPRoute\",\n    \"HTTPRouteHandler\",\n    \"HttpMethod\",\n    \"ImproperlyConfiguredException\",\n    \"InternalServerException\",\n    \"LoggingConfig\",\n    \"MediaType\",\n    \"MiddlewareProtocol\",\n    \"MissingDependencyException\",\n    \"NotAuthorizedException\",\n    \"NotFoundException\",\n    \"OpenAPIConfig\",\n    \"OpenAPIController\",\n    \"OpenAPIMediaType\",\n    \"Parameter\",\n    \"Partial\",\n    \"PermissionDeniedException\",\n    \"PluginProtocol\",\n    \"Provide\",\n    \"QueueListenerHandler\",\n    \"Redirect\",\n    \"Request\",\n    \"RequestEncodingType\",\n    \"Response\",\n    \"ResponseHeader\",\n    \"Router\",\n    \"ScopeType\",\n    \"ServiceUnavailableException\",\n    \"StarLiteException\",\n    \"Starlite\",\n    \"State\",\n    \"StaticFilesConfig\",\n    \"Stream\",\n    \"Template\",\n    \"TemplateConfig\",\n    \"TestClient\",\n    \"ValidationException\",\n    \"WebSocket\",\n    \"WebSocketRoute\",\n    \"WebsocketRouteHandler\",\n    \"asgi\",\n    \"create_test_client\",\n    \"create_test_request\",\n    \"delete\",\n    \"get\",\n    \"patch\",\n    \"post\",\n    \"put\",\n    \"route\",\n    \"websocket\",\n]\n\n_dynamic_imports = {\"TestClient\", \"create_test_client\", \"create_test_request\"}\n\n\n# pylint: disable=import-outside-toplevel\ndef __getattr__(name: str) -> Any:\n    \"\"\"Provide lazy importing as per https://peps.python.org/pep-0562/\"\"\"\n    if name not in _dynamic_imports:\n        raise AttributeError(f\"Module {__package__} has no attribute {name}\")\n\n    from . import testing\n\n    attr = globals()[name] = getattr(testing, name)\n    return attr\n", "path": "starlite/__init__.py"}]}