

def test_node_children_list_does_not_include_deleted(self):
    child_project = NodeFactory(parent=self.public_project, creator=self.user)
    child_project.save()
    res = self.app.get(self.public_project_url, auth=child_project.user.auth)
    assert_equal(res.status_code, 200)
    ids = [node['id'] for node in res.json['data']]
    assert_in(child_project._id, ids)
    assert_equal(2, len(ids))
    child_project.is_deleted = True
    child_project.save()
    res = self.app.get(self.public_project_url, auth=self.user.auth)
    assert_equal(res.status_code, 200)
    ids = [node['id'] for node in res.json['data']]
    assert_not_in(child_project._id, ids)
    assert_equal(1, len(ids))

dataset/ETHPy150Open CenterForOpenScience/osf.io/api_tests/nodes/views/test_node_children_list.py TestNodeChildrenList.test_node_children_list_does_not_include_deleted/VarMisuse@47/63 `self`->`child_project`