test_aide.classes.test_object_method

test_aide.classes.test_object_method(obj, expected_method, msg)[source]

Test that a particular object has a given method and the (method) attribute is callable.

Uses hasattr to check the method attribute exists, then callable(getattr()) to check the method is callable.

Parameters
  • obj (object) – The object to test.

  • expected_method (str) – Name of expected method on obj.