Skip to content

Commit

Permalink
Scipped tests don't render as ERROR's
Browse files Browse the repository at this point in the history
Replaced `raise nose.exc.SkipTest()` statement to self.skipTest().
Removed unused nose.exc imports.

Fixes bug 1172794

Change-Id: Ieb353864acadef43508d185156c7fa1667baa845
  • Loading branch information
vikt0rs committed Jul 26, 2013
1 parent 0a40152 commit 7c28b27
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 67 deletions.
3 changes: 1 addition & 2 deletions tests/_ldap_livetest.py
Expand Up @@ -16,7 +16,6 @@

import ldap
import ldap.modlist
import nose.exc
import subprocess

from keystone.common import ldap as ldap_common
Expand Down Expand Up @@ -89,7 +88,7 @@ def tearDown(self):
test.TestCase.tearDown(self)

def test_user_enable_attribute_mask(self):
raise nose.exc.SkipTest('Test is for Active Directory Only')
self.skipTest('Test is for Active Directory Only')

def test_ldap_dereferencing(self):
alt_users_ldif = {'objectclass': ['top', 'organizationalUnit'],
Expand Down
22 changes: 10 additions & 12 deletions tests/test_backend_kvs.py
Expand Up @@ -15,8 +15,6 @@
# under the License.
import uuid

import nose.exc

from keystone import test

from keystone import exception
Expand All @@ -36,34 +34,34 @@ def setUp(self):

def test_list_user_projects(self):
# NOTE(chungg): not implemented
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_create_duplicate_group_name_in_different_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_create_duplicate_user_name_in_different_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_create_duplicate_project_name_in_different_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_user_between_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_user_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_group_between_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_group_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_project_between_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')

def test_move_project_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1119770')
self.skipTest('Blocked by bug 1119770')


class KvsToken(test.TestCase, test_backend.TokenTests):
Expand Down
68 changes: 33 additions & 35 deletions tests/test_backend_ldap.py
Expand Up @@ -17,8 +17,6 @@

import uuid

import nose.exc

from keystone import assignment
from keystone.common.ldap import fakeldap
from keystone.common import sql
Expand Down Expand Up @@ -109,93 +107,93 @@ def test_user_filter(self):
self.user_foo['id'])

def test_get_role_grant_by_user_and_project(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_get_role_grants_for_user_and_project_404(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_add_role_grant_to_user_and_project_404(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_remove_role_grant_from_user_and_project(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_get_and_remove_role_grant_by_group_and_project(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_get_and_remove_role_grant_by_group_and_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_get_and_remove_role_grant_by_user_and_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_get_and_remove_correct_role_grant_from_a_mix(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_get_and_remove_role_grant_by_group_and_cross_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_get_and_remove_role_grant_by_user_and_cross_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_role_grant_by_group_and_cross_domain_project(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_role_grant_by_user_and_cross_domain_project(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_multi_role_grant_by_user_group_on_project_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_delete_role_with_user_and_group_grants(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_delete_user_with_group_project_domain_links(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_delete_group_with_user_project_domain_links(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_list_user_projects(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_create_duplicate_user_name_in_different_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_create_duplicate_project_name_in_different_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_create_duplicate_group_name_in_different_domains(self):
raise nose.exc.SkipTest(
self.skipTest(
'N/A: LDAP does not support multiple domains')

def test_move_user_between_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_move_user_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_move_group_between_domains(self):
raise nose.exc.SkipTest(
self.skipTest(
'N/A: LDAP does not support multiple domains')

def test_move_group_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_move_project_between_domains(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_move_project_between_domains_with_clashing_names_fails(self):
raise nose.exc.SkipTest('Blocked by bug 1101276')
self.skipTest('Blocked by bug 1101276')

def test_get_roles_for_user_and_domain(self):
raise nose.exc.SkipTest('N/A: LDAP does not support multiple domains')
self.skipTest('N/A: LDAP does not support multiple domains')

def test_list_role_assignments_unfiltered(self):
raise nose.exc.SkipTest('Blocked by bug 1195019')
self.skipTest('Blocked by bug 1195019')

def test_multi_group_grants_on_project_domain(self):
raise nose.exc.SkipTest('Blocked by bug 1101287')
self.skipTest('Blocked by bug 1101287')

def test_list_group_members_missing_entry(self):
"""List group members with deleted user.
Expand Down Expand Up @@ -631,7 +629,7 @@ def test_multi_role_grant_by_user_group_on_project_domain(self):
self.assertEquals(len(combined_role_list), 0)

def test_list_projects_for_alternate_domain(self):
raise nose.exc.SkipTest(
self.skipTest(
'N/A: LDAP does not support multiple domains')


Expand Down Expand Up @@ -705,7 +703,7 @@ def test_user_crud(self):
user['id'])

def test_user_enable_attribute_mask(self):
raise nose.exc.SkipTest(
self.skipTest(
"Enabled emulation conflicts with enabled mask")


Expand Down Expand Up @@ -739,9 +737,9 @@ def test_list_domains(self):
self.assertEquals(domains, [assignment.DEFAULT_DOMAIN])

def test_project_filter(self):
raise nose.exc.SkipTest(
self.skipTest(
'N/A: Not part of SQL backend')

def test_role_filter(self):
raise nose.exc.SkipTest(
self.skipTest(
'N/A: Not part of SQL backend')
3 changes: 1 addition & 2 deletions tests/test_content_types.py
Expand Up @@ -18,7 +18,6 @@
import uuid

from lxml import etree
import nose.exc
import webtest

from keystone import test
Expand Down Expand Up @@ -471,7 +470,7 @@ def test_get_tenant_by_name(self):
self.assertValidTenantResponse(r)

def test_get_user_roles(self):
raise nose.exc.SkipTest('Blocked by bug 933565')
self.skipTest('Blocked by bug 933565')

token = self.get_scoped_token()
r = self.admin_request(
Expand Down
18 changes: 8 additions & 10 deletions tests/test_keystoneclient.py
Expand Up @@ -17,8 +17,6 @@
import uuid
import webob

import nose.exc

from keystone import test
from keystone import token

Expand Down Expand Up @@ -538,7 +536,7 @@ def test_user_update_404(self):
user=uuid.uuid4().hex)

def test_user_update_tenant_404(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')
from keystoneclient import exceptions as client_exceptions
client = self.get_client(admin=True)
self.assertRaises(client_exceptions.NotFound,
Expand Down Expand Up @@ -1109,10 +1107,10 @@ def test_roles_get_by_user(self):
self.assertTrue(len(roles) > 0)

def test_role_list_404(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')

def test_authenticate_and_delete_token(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')

def test_user_create_update_delete(self):
from keystoneclient import exceptions as client_exceptions
Expand Down Expand Up @@ -1156,21 +1154,21 @@ def test_user_create_update_delete(self):
user.id)

def test_user_update_404(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')

def test_endpoint_create_404(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')

def test_endpoint_delete_404(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')

def test_policy_crud(self):
raise nose.exc.SkipTest('N/A due to lack of endpoint CRUD')
self.skipTest('N/A due to lack of endpoint CRUD')


class Kc11TestCase(CompatTestCase, KeystoneClientTests):
def get_checkout(self):
return KEYSTONECLIENT_REPO, '0.1.1'

def test_policy_crud(self):
raise nose.exc.SkipTest('N/A')
self.skipTest('N/A')
4 changes: 1 addition & 3 deletions tests/test_keystoneclient_sql.py
Expand Up @@ -16,8 +16,6 @@

import uuid

import nose.exc

from keystone import test

from keystone.common import sql
Expand Down Expand Up @@ -109,7 +107,7 @@ def test_policy_crud(self):
# the client and essentially refers to a non-existent
# policy manager in the v2 client. this test needs to be
# moved to a test suite running against the v3 api
raise nose.exc.SkipTest('Written prior to v3 client; needs refactor')
self.skipTest('Written prior to v3 client; needs refactor')

from keystoneclient import exceptions as client_exceptions
client = self.get_client(admin=True)
Expand Down
4 changes: 1 addition & 3 deletions tests/test_v3_auth.py
Expand Up @@ -15,8 +15,6 @@
import json
import uuid

import nose.exc

from keystone import auth
from keystone.common import cms
from keystone import config
Expand Down Expand Up @@ -1438,7 +1436,7 @@ def setUp(self):
self.identity_api.create_user(self.trustee_user_id, self.trustee_user)

def test_create_trust_400(self):
raise nose.exc.SkipTest('Blocked by bug 1133435')
self.skipTest('Blocked by bug 1133435')
self.post('/OS-TRUST/trusts', body={'trust': {}}, expected_status=400)

def test_create_unscoped_trust(self):
Expand Down

0 comments on commit 7c28b27

Please sign in to comment.