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")
示例#2
0
    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')
示例#3
0
    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')
示例#4
0
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")