mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-03-06 23:24:27 +08:00
updated package setup (#485)
* updated package setup * updated to use python 3.9 * fixed test runner * fixed typecheck tests * fixed discrepencies * added override to runner * updated travis * updated pre-commit hooks * updated dep
This commit is contained in:
committed by
GitHub
parent
a3624dec36
commit
44151c485d
12
tests/typecheck/test/test_testcase.yml
Normal file
12
tests/typecheck/test/test_testcase.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- case: testcase_client_attr
|
||||
main: |
|
||||
from django.test.testcases import TestCase
|
||||
|
||||
class ExampleTestCase(TestCase):
|
||||
def test_method(self) -> None:
|
||||
reveal_type(self.client) # N: Revealed type is 'django.test.client.Client'
|
||||
resp = self.client.post('/url', {'doit': 'srs'}, 'application/json', False, True, extra='value')
|
||||
reveal_type(resp.status_code) # N: Revealed type is 'builtins.int'
|
||||
# Attributes monkey-patched by test Client class:
|
||||
resp.json()
|
||||
reveal_type(resp.wsgi_request) # N: Revealed type is 'django.core.handlers.wsgi.WSGIRequest'
|
||||
Reference in New Issue
Block a user