Move run_function call from __init__ to setup

This commit is contained in:
Ch3LL 2018-08-23 15:34:27 -04:00
parent bc0b4ac513
commit 0a5d44a3db
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -31,12 +31,12 @@ class ShadowModuleTest(ModuleCase):
super(self.__class__, self).__init__(arg)
self._test_user = self.__random_string()
self._no_user = self.__random_string()
self._password = self.run_function('shadow.gen_password', ['Password1234'])
def setUp(self):
'''
Get current settings
'''
self._password = self.run_function('shadow.gen_password', ['Password1234'])
if 'ERROR' in self._password:
self.fail('Failed to generate password: {0}'.format(self._password))
super(ShadowModuleTest, self).setUp()