

def test_get_doc_dict(self):
    client = Client()
    response = client.get('/docs/first/3?_doc&format=json')
    self.assertEquals(response.status_code, 200)
    doc = json.loads(response.content)
    expected = {
        'resource': 'my/test/resource',
        'description': ' My test resource\n\n    description of my resource\n    ',
        'urls': ['docs/first/(?P<first_id>\\d{1,7})?$'],
        'methods': {
            'get': ' hiihoo get\n\n        hiihoo description\n        ',
        },
        'representation': {
            'age': {
                'required': False,
                'type': 'IntegerField',
                'validators': [],
            },
            'name': {
                'required': False,
                'type': 'CharField',
                'validators': [{
                    'MaxLengthValidator': {
                        'limit_value': 30,
                    },
                }],
            },
            'weight': {
                'required': True,
                'type': 'IntegerField',
                'validators': [],
            },
        },
    }
    doc.assertEquals(doc, expected)

dataset/ETHPy150Open wuher/devil/test/deviltest/docs/tests.py DocTests.test_get_doc_dict/VarMisuse@173/315 `self`->`doc`