Expose what's happening behind the scenes for test_user_if_present_with_gid()

* Expose what's happening in `integration.states.user.UserTest.test_user_if_present_with_gid()`.
* Update code that was using the old `SaltReturnAssertsMixIn`.
This commit is contained in:
Pedro Algarvio 2012-11-21 12:19:18 +00:00
parent 1f03ba59f1
commit 3401445e8b
2 changed files with 4 additions and 7 deletions

View File

@ -10,7 +10,8 @@ import integration
import grp
class UserTest(integration.ModuleCase):
class UserTest(integration.ModuleCase,
integration.SaltReturnAssertsMixIn):
'''
test for user absent
'''
@ -27,8 +28,7 @@ class UserTest(integration.ModuleCase):
def test_user_if_present_with_gid(self):
# TODO:dc fix failing test. Exception in ret
ret = self.run_state('user.present', name='nobody', gid="nobody")
result = ret[next(iter(ret))]['result']
self.assertTrue(result)
self.assertSaltTrueReturn(ret)
@destructiveTest
@skipIf(os.geteuid() is not 0, 'you must be this root to run this test')

View File

@ -35,10 +35,7 @@ class VirtualenvTest(integration.ModuleCase,
ret = self.run_function(
'state.sls', mods='issue-1959-virtualenv-runas'
)
self.assertTrue(isinstance(ret, dict))
self.assertNotEqual(ret, {})
for part in ret.itervalues():
self.assertSaltTrueReturn(part)
self.assertSaltTrueReturn(ret)
# Lets check proper ownership
statinfo = self.run_function('file.stats', [venv_dir])