def serializable(self): """ Return a form of the class that is easy to serialize (with JSON etc) """ ser = {} ser['name'] = self.name ser['product'] = self.backing.product_name ser['uuid'] = self.uuid ser['real id'] = self.get_real_id() ser['actions'] = get_actions(self) ser['attributes'] = self.attributes.serializable() return ser
def test_get_actions(self): acts = get_actions(self.inner) self.assertEquals(['floop'], acts)