Commit Graph

12 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 48ae5ccc0e
Add type hints to `test_background.py` (#2473)
Co-authored-by: Scirlat Danut <scirlatdanut@scirlats-mini.lan>
2024-02-04 16:48:26 +00:00
dependabot[bot] d28d491a34
Bump ruff from 0.1.6 to 0.1.9 (#2396)
* Bump ruff from 0.1.6 to 0.1.9

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.6 to 0.1.9.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.1.6...v0.1.9)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix code

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-01-08 08:49:23 +00:00
Marcelo Trylesinski decc527933
Document `BackgroundTasks` behavior when an error happens (#1605)
* Document `BackgroundTasks` behavior when an error happens

* Document `BackgroundTasks` behavior when an error happens
2022-04-24 08:17:07 +02: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 4d5708e468
ASGI 3 (#435)
* TestClient supports ASGI2 and ASGI3

* Starlette instances present ASGI3 interface

* ServerErrorMiddleware presents ASGI3 interface

* Use ASGI3 protocol throughout

* Response signatures match ASGI interface.
2019-03-19 16:03:19 +00:00
Tom Christie 96c09044e8
Add BackgroundTasks for multiple jobs. Support GraphQL background tasks. (#273) 2018-12-14 14:56:31 +00:00
Alexander Botello 95517b7002 remove unused imports (#228) 2018-11-21 19:12:44 +00:00
Tom Christie bcf876c686
Use isort for consistent import ordering (#156) 2018-10-29 14:46:42 +00:00
Tom Christie 7dc07267c2 Update background task tests 2018-10-02 12:29:44 +01:00
Alex Botello 7c1a1e9dd5 Add support for background tasks (#65)
* Build out a BackgroundTask class

* Integrate BackgroundTask into Response class

* Add test cases for background tasks

* Add documentation for background tasks

* Reformat files with black

* Make requested changes

* Improve documentation example
2018-10-02 11:40:08 +01:00