File: func_noerror_test_wsgi_request.py

package info (click to toggle)
pylint-django 2.0.13-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 660 kB
  • sloc: python: 1,807; sh: 13; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
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."""


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)