def test_useradd(self): """ Test if it add HTTP user using the ``htpasswd`` command """ mock = MagicMock(return_value=True) with patch.dict(apache.__salt__, {"webutil.useradd": mock}): assert apache.useradd("htpasswd", "salt", "badpassword") is True
def test_useradd(self): ''' Test if it add HTTP user using the ``htpasswd`` command ''' mock = MagicMock(return_value=True) with patch.dict(apache.__salt__, {'webutil.useradd': mock}): self.assertTrue(apache.useradd('htpasswd', 'salt', 'badpassword'))
def test_useradd(self): ''' Test if it add HTTP user using the ``htpasswd`` command ''' mock = MagicMock(return_value=True) with patch.dict(apache.__salt__, {'webutil.useradd': mock}): self.assertTrue(apache.useradd('htpasswd', 'salt', 'badpassword'))