Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling another Mocked DBus Method inside the Custom call back function of a mocked method #171

Open
AlldreenDev opened this issue Feb 14, 2023 · 0 comments

Comments

@AlldreenDev
Copy link

AlldreenDev commented Feb 14, 2023

Hi. Thanks for developing this module as it has been used widely in our project for component testing.

I have issue in calling a mocked DBus method inside a custom call back function of a mocked method.

The below are my two mock methods:

      dbus_mock.AddMethod(' ', 'SetValue', 'sv', ' ', ' ')

      dbus_mock.AddMethod( ' ', 'GetValue' , 's' , 'v', getValuefun())

The call back function:

 def getValuefun():

     calls_made = dbus_mock.GetMethodCalls('SetValue')

     print(calls_made) # This output should be returned

     ret_val = 'ret = "{}"'.format(calls_made)

     return  ret_val

On execution of this function, I am getting empty array for the "calls_made" variable. Is this the correct way of doing this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant