Merge pull request #4655 from hulu/is-not-0-must-die

is not 0 => != 0
This commit is contained in:
Pedro Algarvio 2013-04-30 10:50:57 -07:00
commit b72b17a565
7 changed files with 10 additions and 10 deletions

View File

@ -161,7 +161,7 @@ sys.stdout.write('cheese')
result = self.run_function('cmd.run_stdout', [cmd]).strip()
self.assertEqual(result, expected_result)
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_quotes_runas(self):
'''
cmd.run with quoted command

View File

@ -27,7 +27,7 @@ class UseraddModuleTest(integration.ModuleCase):
)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_groups_includes_primary(self):
# Let's create a user, which usually creates the group matching the
# name

View File

@ -27,7 +27,7 @@ class UseraddModuleTest(integration.ModuleCase):
)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_groups_includes_primary(self):
# Let's create a user, which usually creates the group matching the
# name

View File

@ -32,7 +32,7 @@ class StateMatchTest(integration.ModuleCase):
ret
)
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_issue_2167_ipcidr_no_AttributeError(self):
subnets = self.run_function('network.subnets')
self.assertTrue(len(subnets) > 0)

View File

@ -33,7 +33,7 @@ class UserTest(integration.ModuleCase,
self.assertSaltTrueReturn(ret)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_user_not_present(self):
'''
This is a DESTRUCTIVE TEST it creates a new user on the minion.
@ -46,7 +46,7 @@ class UserTest(integration.ModuleCase,
self.assertSaltTrueReturn(ret)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_user_present_nondefault(self):
'''
This is a DESTRUCTIVE TEST it creates a new user on the on the minion.
@ -59,7 +59,7 @@ class UserTest(integration.ModuleCase,
self.assertSaltTrueReturn(ret)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_user_present_gid_from_name_default(self):
'''
This is a DESTRUCTIVE TEST. It creates a new user on the on the minion.
@ -83,7 +83,7 @@ class UserTest(integration.ModuleCase,
self.assertSaltTrueReturn(ret)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_user_present_gid_from_name(self):
'''
This is a DESTRUCTIVE TEST it creates a new user on the on the minion.

View File

@ -27,7 +27,7 @@ class VirtualenvTest(integration.ModuleCase,
self.skipTest('virtualenv not installed')
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be root to run this test')
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
def test_issue_1959_virtualenv_runas(self):
user = 'issue-1959'
if not self.run_function('user.add', [user]):

View File

@ -313,7 +313,7 @@ def parse_opts():
if any((options.module, options.client, options.shell, options.unit,
options.state, options.runner, options.name,
os.geteuid() is not 0, not options.run_destructive)):
os.geteuid() != 0, not options.run_destructive)):
parser.error(
'No sense in generating the tests coverage report when not '
'running the full test suite, including the destructive '