Commit Graph

10 Commits

Author SHA1 Message Date
Marcelo Trylesinski b9db010d49
Set `line-length` to 120 on Ruff (#2679)
* Set `line-length` to 120 on Ruff

* Add links to selected rules

* Remove empty strings

* Fix more stuff
2024-09-01 15:11:01 +02:00
Scirlat Danut 78fcd54c07
Create types module inside tests (#2502)
* Create types module inside tests

* Apply suggestions from code review

* Apply suggestions from code review

* Fix check errors

* Change testclientfactory due to autotest

* No cover fix

* Apply suggestions from code review

* Skip code coverage for TestClientFactory protocol

* Apply suggestions from code review

* Small improvements

* Lint

* Fix everything

---------

Co-authored-by: Scirlat Danut <scirlatdanut@scirlats-mini.lan>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-07-27 03:31:16 -06:00
Scirlat Danut 52531565cc
Added type annotations to test_endpoints.py (#2478)
* added type annotations to test_endpoints.py

* Apply suggestions from code review

---------

Co-authored-by: Scirlat Danut <scirlatdanut@scirlats-mini.lan>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-02-04 14:06:00 -07:00
Adrian Garcia Badaracco 79812bb220
add Allow header to 405 responses as required by RFC 7231 (#1436) 2022-01-26 10:02:25 -06:00
Thomas Grainger d222b87cb4
TestClient accepts backend and backend_options as arguments to constructor (#1211)
as opposed to ClassVar assignment 

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
Co-authored-by: Jordan Speicher <uSpike@users.noreply.github.com>
2021-06-28 21:36:13 +01:00
Tom Christie 1ee194739f
WebSockets now default to sending JSON using text dataframes (#349) 2019-01-25 15:27:39 +00:00
Tom Christie bcf876c686
Use isort for consistent import ordering (#156) 2018-10-29 14:46:42 +00:00
Tom Christie 8da0f00fe7
Routing interface (#144)
* Path -> Route, PathPrefix -> Mount

* Route, WebSocketRoute, Mount

* Use Route(endpoint=...), not Route(app=...)

* Bare minimum docs update

* Add url_for

* request.path_params and session.path_params

* Version 0.6.0
2018-10-29 09:22:45 +00:00
Jordan Eremieff 1ce4c89149 Class-based websocket handler (#62)
* WebSocketEndpoint class, docs, tests.

* Refactor WebSocketEndpoint class to only store scope. Update WebSocketEndpoint docs example and tests.

* Add decode method to WebSocketEndpoint, update docs, update tests
2018-10-02 11:26:19 +01:00
Jordan Eremieff f4fe0ec312 Name changes (#55)
* Rename View -> HTTPEndpoint

* Rename views doc file -> endpoints

* Rename request/response files -> requests/responses, update imports, update docs

* Rename WebSocketSession -> WebSocket, rename session -> websocket in docs

* Full module imports in tests and source, removing imports from __init__ file

* Fix name in testclient doc
2018-09-05 10:29:04 +01:00