Skip to content

Commit

Permalink
Merge pull request #1102 from adriaanwm/adriaanwm/patch-1
Browse files Browse the repository at this point in the history
Fix TestClient name in testing docs
  • Loading branch information
vitalik committed Apr 30, 2024
2 parents e133410 + 80b5298 commit d9bda3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ from ninja.testing import TestClient

class HelloTest(TestCase):
def test_hello(self):
client = NinjaTestClient(router)
client = TestClient(router)
response = client.get("/hello")

self.assertEqual(response.status_code, 200)
Expand All @@ -37,7 +37,7 @@ Arbitrary attributes can be added to the request object by passing keyword argum
```python
class HelloTest(TestCase):
def test_hello(self):
client = NinjaTestClient(router)
client = TestClient(router)
# request.company_id will now be set within the view
response = client.get("/hello", company_id=1)
```

0 comments on commit d9bda3a

Please sign in to comment.