

def test_cannot_create_child_on_a_registration(self):
    registration = RegistrationFactory(project=self.project, creator=self.user)
    url = '/{}nodes/{}/children/'.format(API_BASE, registration._id)
    res = registration.app.post_json_api(url, {
        'data': {
            'type': 'nodes',
            'attributes': {
                'title': fake.catch_phrase(),
                'description': fake.bs(),
                'category': 'project',
                'public': True,
            },
        },
    }, auth=self.user.auth, expect_errors=True)
    assert_equal(res.status_code, 404)

dataset/ETHPy150Open CenterForOpenScience/osf.io/api_tests/nodes/views/test_node_children_list.py TestNodeChildCreate.test_cannot_create_child_on_a_registration/VarMisuse@42/58 `self`->`registration`