예제 #1
0
파일: __init__.py 프로젝트: nikron/bridge
    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
예제 #2
0
파일: actiontest.py 프로젝트: nikron/bridge
 def test_get_actions(self):
     acts = get_actions(self.inner)
     self.assertEquals(['floop'], acts)