Skip to content

Commit

Permalink
Add test for WSGIRequest.context. Closes #78
Browse files Browse the repository at this point in the history
The test can't reproduce the original problem reported in the issue
so consider it resolved.
  • Loading branch information
atodorov committed Apr 6, 2018
1 parent 70bc54b commit 4b2515a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions pylint_django/tests/input/func_noerror_test_wsgi_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Checks that Pylint does not complain about a standard test. See:
https://github.com/PyCQA/pylint-django/issues/78
"""

from django.test import TestCase
from django.db import models


class SomeModel(models.Model):
"""Just a model."""
pass


class SomeTestCase(TestCase):
"""A test cast."""
def test_thing(self):
"""Test a thing."""
expected_object = SomeModel()
response = self.client.get('/get/some/thing/')
self.assertEqual(response.status_code, 200)
self.assertEqual(response.context['object'], expected_object)

0 comments on commit 4b2515a

Please sign in to comment.