

def test_bulk_creates_children_no_type(self):
    child = {
        'data': [self.child_two, {
            'attributes': {
                'title': 'child',
                'description': 'this is a child project',
                'category': 'project',
            },
        }],
    }
    res = self.app.post_json_api(self.url, child, auth=self.user.auth, expect_errors=True, bulk=True)
    assert_equal(res.status_code, 400)
    assert_equal(res.json['errors'][0]['detail'], 'This field may not be null.')
    assert_equal(res.json['errors'][0]['source']['pointer'], '/data/1/type')
    self.project.reload()
    assert_equal(len(self.project.nodes), 0)

dataset/ETHPy150Open CenterForOpenScience/osf.io/api_tests/nodes/views/test_node_children_list.py TestNodeChildrenBulkCreate.test_bulk_creates_children_no_type/original