'Call ``GET  /credentials?user_id={user_id}``.'

def test_list_credentials_filtered_by_user_id(self):

    credential = unit.new_credential_ref(user_id=uuid.uuid4().hex)
    self.credential_api.create_credential(credential['id'], credential)
    r = self.get(('/credentials?user_id=%s' % self.user['id']))
    self.assertValidCredentialListResponse(r, ref=self.credential)
    for cred in r.result['credentials']:
        self.assertEqual(self.user['id'], cred['user_id'])
