def test_hash(self): """ Test for Encodes a value with the specified encoder. """ self.assertEqual(mod_random.hash("value")[0:4], "ec2c") self.assertRaises(SaltInvocationError, mod_random.hash, "value", "algorithm")
def test_hash(self): ''' Test for Encodes a value with the specified encoder. ''' self.assertEqual(mod_random.hash('value')[0:4], 'ec2c') self.assertRaises(SaltInvocationError, mod_random.hash, 'value', 'algorithm')
def test_hash(): """ Test for Encodes a value with the specified encoder. """ assert mod_random.hash("value")[0:4] == "ec2c" pytest.raises(SaltInvocationError, mod_random.hash, "value", "algorithm")