Skip to content

Commit 9284cc4

Browse files
authored
Merge pull request #24 from MarcinWieczorek/patch-testclient
Add APIClient type to test cases
2 parents b6e9bd5 + 7c04d4b commit 9284cc4

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# pep484 stubs for Django REST framework
44

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

88

@@ -30,4 +30,4 @@ in your `mypy.ini` file.
3030

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

33-
If you think you have more generic typing issue, please refer to https://github.com/python/mypy and their Gitter.
33+
If you think you have more generic typing issue, please refer to https://github.com/python/mypy and their Gitter.

rest_framework-stubs/test.pyi

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,16 @@ class APIClient(DjangoClient):
6060
**extra: Any
6161
) -> Response: ...
6262

63-
class APITransactionTestCase(testcases.TransactionTestCase): ...
64-
class APITestCase(testcases.TestCase): ...
65-
class APISimpleTestCase(testcases.SimpleTestCase): ...
66-
class APILiveServerTestCase(testcases.LiveServerTestCase): ...
63+
class APITransactionTestCase(testcases.TransactionTestCase):
64+
client: APIClient
65+
66+
class APITestCase(testcases.TestCase):
67+
client: APIClient
68+
69+
class APISimpleTestCase(testcases.SimpleTestCase):
70+
client: APIClient
71+
72+
class APILiveServerTestCase(testcases.LiveServerTestCase):
73+
client: APIClient
74+
6775
class URLPatternsTestCase(testcases.SimpleTestCase): ...

0 commit comments

Comments
 (0)