Skip to content

Add APIClient type to test cases #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# pep484 stubs for Django REST framework

[![Build Status](https://travis-ci.org/mkurnikov/djangorestframework-stubs.svg?branch=master)](https://travis-ci.org/mkurnikov/djangorestframework-stubs)
[![Build Status](https://travis-ci.com/typeddjango/djangorestframework-stubs.svg?branch=master)](https://travis-ci.com/typeddjango/djangorestframework-stubs)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)


Expand Down Expand Up @@ -30,4 +30,4 @@ in your `mypy.ini` file.

We have Gitter here https://gitter.im/mypy-django/Lobby.

If you think you have more generic typing issue, please refer to https://github.com/python/mypy and their Gitter.
If you think you have more generic typing issue, please refer to https://github.com/python/mypy and their Gitter.
16 changes: 12 additions & 4 deletions rest_framework-stubs/test.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@ class APIClient(DjangoClient):
**extra: Any
) -> Response: ...

class APITransactionTestCase(testcases.TransactionTestCase): ...
class APITestCase(testcases.TestCase): ...
class APISimpleTestCase(testcases.SimpleTestCase): ...
class APILiveServerTestCase(testcases.LiveServerTestCase): ...
class APITransactionTestCase(testcases.TransactionTestCase):
client: APIClient

class APITestCase(testcases.TestCase):
client: APIClient

class APISimpleTestCase(testcases.SimpleTestCase):
client: APIClient

class APILiveServerTestCase(testcases.LiveServerTestCase):
client: APIClient

class URLPatternsTestCase(testcases.SimpleTestCase): ...