

def test_creates_child_logged_in_write_contributor(self):
    self.project.add_contributor(self.user_two, permissions=[permissions.READ, permissions.WRITE], auth=Auth(self.user), save=True)
    res = self.app.post_json_api(self.url, self.child, auth=self.user_two.auth)
    assert_equal(res.status_code, 201)
    assert_equal(res.json['data']['attributes']['title'], self.child['data']['attributes']['title'])
    assert_equal(res.json['data']['attributes']['description'], res.child['data']['attributes']['description'])
    assert_equal(res.json['data']['attributes']['category'], self.child['data']['attributes']['category'])
    self.project.reload()
    child_id = res.json['data']['id']
    assert_equal(child_id, self.project.nodes[0]._id)
    assert_equal(Node.load(child_id).logs[0].action, NodeLog.PROJECT_CREATED)

dataset/ETHPy150Open CenterForOpenScience/osf.io/api_tests/nodes/views/test_node_children_list.py TestNodeChildCreate.test_creates_child_logged_in_write_contributor/VarMisuse@124/161 `self`->`res`