Vincent Barbaresi
86361523e2
fix async templates rendering requiring enable_async in jinja2
...
When trying to test the render_async() feature I realized that it wasn't working
The template instance needs to be created with enable_async=True
2019-10-19 14:49:50 +02:00
Vincent Barbaresi
d3e4968546
add a few tests for API and remove some dead code
...
Increasing the coverage of api.py to 86%
- use pytest.parametrize to test cors and hsts parameters usage
- use pytest.parametrize to factorize test_staticfiles_custom_route
- add tests for path_matches_route and Route() with no endpoint
- test Jinja template rendering from a file
- remove _notfound_wsgi_app, before_ws_requests, before_http_requests
they didn't seem used anywhere and the before_* method were broken, referring to
self.before_requests that doesn't exist anymore
2019-10-19 13:47:39 +02:00
taoufik
0653ee2c6b
Add Templates
2019-08-21 13:46:31 +02:00
taoufik
d24b921cdc
Move open api schema to ext/schema
2019-08-17 18:25:19 +02:00
taoufik
b31b742787
Implement a new Router and other changes
...
- Router
- Use starlette's Session middlewre
- Add Exception Middleware
- ...
2019-08-17 14:41:11 +02:00
FirstKlaas
d73243ab60
Linting with black
2019-08-07 18:44:43 +02:00
FirstKlaas
8101e7d7b0
Added a state property to the request opbject.
2019-08-07 18:29:03 +02:00
ucpr
bd2efb68e1
test: add test for #367
2019-07-30 00:26:01 +09:00
taoufik
b2dd2c205d
Fix tests
2019-04-28 15:48:36 +02:00
Taoufik
f95950eedc
Cleanup
2019-04-27 13:49:54 +02:00
kennethreitz
4467376d0a
Merge pull request #333 from taoufik07/custom_specifiers
...
Route params convertors
2019-04-27 07:32:13 -04:00
ikronskun
e65d2f8c50
fix variable error at test responder
2019-03-14 14:25:45 +08:00
taoufik07
9ea705b2ea
Specifiers test
2019-03-12 17:39:53 +01:00
taoufik07
a35f02fb64
Add tests
2019-02-26 22:23:43 +01:00
taoufik07
f9a850a8fe
Add before_requets for ws and refactor
2019-02-26 15:50:55 +01:00
taoufik07
3e26dc1373
Add websockets tests
2019-02-23 16:00:22 +01:00
taoufik07
b21e308357
Add tests
2019-02-22 12:44:32 +01:00
Taoufik
2ad351197e
Merge pull request #304 from taoufik07/content_type
...
Add resp.html property and make resp.text a property
2019-02-22 10:12:46 +00:00
taoufik07
2cd5596def
lint
2019-02-22 10:40:27 +01:00
Taoufik
d4191030d9
Merge branch 'master' into multiple_cookies_and_directives
2019-02-22 10:33:53 +01:00
Taoufik
447630a051
Merge branch 'master' into content_type
2019-02-22 10:30:38 +01:00
Timo Furrer
f7b53a4895
Merge pull request #308 from taoufik07/feature/stream
...
Support stream response
2019-02-22 10:15:42 +01:00
taoufik07
21896aa171
Support stream response
2019-02-22 03:58:09 +01:00
icleary
0030993631
api OpenAPI params match /docs display order, updated tour docs and docs test
2019-02-21 18:35:19 -07:00
taoufik07
acd1561b1b
Add tests
2019-02-22 00:01:49 +01:00
taoufik07
e2f887ec5f
Add tests
2019-02-21 00:51:31 +01:00
taoufik07
1ec567cabf
Cleanup and black
2019-02-19 13:47:59 +01:00
taoufik07
4d0382d580
Lint
2019-02-19 13:33:17 +01:00
taoufik07
a0dd7481ec
Add tests
2019-02-17 19:39:36 +01:00
Taoufik
5f5402833b
Typos
2019-02-13 15:09:48 +00:00
Tom Christie
9f0a568fa3
Resolve startup/shutdwown events
2019-01-09 12:42:15 +00:00
kennethreitz
3ba12b8cee
Merge pull request #230 from tkamenoko/file-form
...
formats: format_file returns filename, data, and content-type [Breaking]
2018-12-12 03:59:10 -05:00
Andrew Stiles
122023fb70
Restore the removal of ExceptionMiddleware
...
Back out the changes made to API and fix the test with a non-raising
instance of TestClient.
2018-11-21 13:05:51 -06:00
Andrew Stiles
b8fa923ec9
Fix broken exception handling in test_500
2018-11-21 11:30:31 -06:00
Tessei Kameyama
f3f36e28c4
[formats] format-files detects file or simple-data
...
if `part` has `content-type`, `format_files` returns
`{"name" : filedata}` . `filedata` is `dict`, the keys are
`filename, content, content-type` .
Otherwise, `format_files` just returns `{"name" : b"data"}` .
2018-11-16 23:50:00 +09:00
Tessei Kameyama
fdf4797726
[test] update file-upload [wip]
...
if form-data don't have content-type,
`req.media("files")` returns `{"name" : b"data"}` , else
`{"name" :
{"filename" : "foo.txt",
"content" : b"data",
"content-type" : "some/type"} }` .
not implemented yet.
2018-11-16 22:13:05 +09:00
Tessei Kameyama
67d8a3be98
[fix] typo
2018-11-16 20:23:09 +09:00
taoufik07
2c686f107d
Tests
2018-11-05 14:52:08 +01:00
taoufik07
21e70ef913
Fix tests
2018-11-05 14:48:34 +01:00
Rodrigo Parra
6993a1ea46
Replace memoize decorator by functools.lru_cache
2018-11-02 06:32:01 -03:00
Taoufik
43b04eccbd
Set debug to False in tests
2018-10-29 22:53:56 +01:00
taoufik07
2cab2dcec0
Tests
2018-10-29 20:54:38 +01:00
kennethreitz
a29e40353c
Merge pull request #170 from taoufik07/trusted_hosts
...
Trusted hosts support
2018-10-28 14:47:28 -04:00
taoufik07
778cb2dd0f
Add Tests
2018-10-28 18:26:42 +00:00
taoufik07
f7d5514b94
Fix test base_url
2018-10-28 18:12:21 +00:00
taoufik07
1f0f2318d5
cleanup
2018-10-28 01:34:26 +01:00
taoufik07
029b3e2a52
Tests
2018-10-28 00:46:50 +01:00
Taoufik
cab78275f4
typo
2018-10-27 22:25:11 +01:00
kennethreitz
9a7409f521
test for before_request
2018-10-27 09:18:07 -04:00
kennethreitz
4d15dbc465
fix for sessions
2018-10-27 07:10:05 -04:00