diff --git a/tests/mctp_test_utils.py b/tests/mctp_test_utils.py index f12c3c3..7ec34ac 100644 --- a/tests/mctp_test_utils.py +++ b/tests/mctp_test_utils.py @@ -6,9 +6,23 @@ async def mctpd_mctp_iface_obj(dbus, iface): ) return await obj.get_interface('au.com.codeconstruct.MCTP.BusOwner1') -async def mctpd_mctp_endpoint_obj(dbus, path): +async def mctpd_mctp_endpoint_obj(dbus, path, iface): obj = await dbus.get_proxy_object( 'au.com.codeconstruct.MCTP1', path, ) - return await obj.get_interface('au.com.codeconstruct.MCTP.Endpoint1') + return await obj.get_interface(iface) + +async def mctpd_mctp_endpoint_control_obj(dbus, path): + return await mctpd_mctp_endpoint_obj( + dbus, + path, + 'au.com.codeconstruct.MCTP.Endpoint1' + ) + +async def mctpd_mctp_endpoint_common_obj(dbus, path): + return await mctpd_mctp_endpoint_obj( + dbus, + path, + 'xyz.openbmc_project.MCTP.Endpoint' + ) diff --git a/tests/test_mctpd.py b/tests/test_mctpd.py index 1ce332f..262917b 100644 --- a/tests/test_mctpd.py +++ b/tests/test_mctpd.py @@ -3,7 +3,10 @@ import uuid import asyncdbus -from mctp_test_utils import mctpd_mctp_iface_obj, mctpd_mctp_endpoint_obj +from mctp_test_utils import ( + mctpd_mctp_iface_obj, + mctpd_mctp_endpoint_control_obj +) from conftest import Endpoint, MCTPSockAddr # DBus constant symbol suffixes: @@ -117,7 +120,7 @@ async def test_remove_endpoint(dbus, mctpd): assert(len(mctpd.system.neighbours) == 1) - ep = await mctpd_mctp_endpoint_obj(dbus, path) + ep = await mctpd_mctp_endpoint_control_obj(dbus, path) await ep.call_remove() assert(len(mctpd.system.neighbours) == 0)