

def test_serialize_entity(self):
    with mock.patch.object(jsonutils, 'to_primitive') as mock_prim:
        rpc.JsonPayloadSerializer.serialize_entity('context', 'entity')
    mock_prim.assert_called_once_with('entity', convert_instances=True)

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/test_rpc.py TestJsonPayloadSerializer.test_serialize_entity/original