test_aide.classes.test_object_attributes

test_aide.classes.test_object_attributes(obj, expected_attributes, msg)[source]

Check a particular object has given attributes.

Function loops through key, value pairs in expected_attributes dict and checks there is an attribute with the name of each key is on obj then calls assert_equal_dispatch to check the expected value and actual value are equal.

Parameters
  • obj (object) – Object to test attributes of.

  • expected_attributes (dict) – Dict of expected attributes and their values.

  • msg (str) – Message tag passed onto assert_equal_dispatch.