Skip to content

E1101: Instance of 'WSGIRequest' has no 'rendered_content' member (no-member) #332

@d33tah

Description

@d33tah

Looks like I managed to reproduce bug #78

pip freeze contents

asgiref==3.4.1
astroid==2.6.6
Django==3.2.6
isort==5.9.3
lazy-object-proxy==1.6.0
mccabe==0.6.1
pylint==2.9.6
pylint-django==2.4.4
pylint-plugin-utils==0.6
pytz==2021.1
sqlparse==0.4.1
toml==0.10.2
wrapt==1.12.1

offending code

from django.test import SimpleTestCase
from django.test import TransactionTestCase


class GrandparentOfSecondClass(TransactionTestCase):

    def get(self):
        return self.client.get("/some/example")


class ParentOfSecondClass(GrandparentOfSecondClass):
    pass


class ThirdBaseClass(ParentOfSecondClass):
    pass


class SecondBaseClass(ParentOfSecondClass):
    pass


class ParentOfGrandparentOfSecondClass(SimpleTestCase):
    pass


class FirstBaseClass(ParentOfGrandparentOfSecondClass):
    pass


class BuggyTestCase(
    FirstBaseClass,
    SecondBaseClass,
    ThirdBaseClass
):

    def test_example(self):
        resp = self.get()
        self.assertEqual(resp.rendered_content, "")

Link to repository

In order to make the bug easy to reproduce, here's a repo with a dockerfile:

https://github.com/d33tah/bug-repro-pylint-django-issue78

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions