

def test_return_registrations_logged_in_contributor(self):
    res = res.app.get(self.url, auth=self.user.auth)
    assert_equal(len(res.json['data']), 2)
    assert_equal(res.status_code, 200)
    registered_from_one = urlparse(res.json['data'][0]['relationships']['registered_from']['links']['related']['href']).path
    registered_from_two = urlparse(res.json['data'][1]['relationships']['registered_from']['links']['related']['href']).path
    assert_equal(res.content_type, 'application/vnd.api+json')
    assert_items_equal([registered_from_one, registered_from_two], ['/{}nodes/{}/'.format(API_BASE, self.public_project._id), '/{}nodes/{}/'.format(API_BASE, self.project._id)])

dataset/ETHPy150Open CenterForOpenScience/osf.io/api_tests/registrations/views/test_registration_list.py TestRegistrationList.test_return_registrations_logged_in_contributor/VarMisuse@12/20 `self`->`res`