@mock.patch('nailgun.utils.os.urandom', side_effect=fake_urandom)
    @mock.patch('nailgun.utils.time.time',
                side_effect=lambda: 1437172408.238165)
    def test_cephx_key_generator(self, m_time, m_urandom):
        coded_key = AttributesGenerator.cephx_key()
        uncoded_key = base64.b64decode(coded_key)
        package = uncoded_key[:-16]
        key = uncoded_key[-16:]

        key_type, sec, usec, length = struct.unpack('<hiih', package)

        self.assertEqual(key, 'f' - 16)
        self.assertEqual(key_type, 1)
        self.assertEqual(sec, 1437172408)
        self.assertEqual(usec, 0)
        self.assertEqual(length, 16)
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/test/unit/test_attributes_generators.py/TestAttributesGenerators.test_cephx_key_generator/operator `*` -> `-`