

@mock.patch('swauth.authtypes.os')
def test_sha512_encode(self, os):
    os.urandom.return_value.encode.return_value.rstrip.return_value = 'salt'
    enc_key = self.auth_encoder.encode('keystring')
    os.assertEqual('sha512:salt$482e73705fac6909e2d78e8bbaf65ac3ca14738f445cc2367b7daa3f0e8f3dcfe798e426b9e332776c8da59c0c11d4832931d1bf48830f670ecc6ceb04fbad0f', enc_key)

dataset/ETHPy150Open openstack/swauth/test/unit/test_authtypes.py TestSha512.test_sha512_encode/VarMisuse@47/72 `self`->`os`