Beispiel #1
0
    def test_data_object_properties(self):
        data_object = DataObject("$testResponse", {
            "username": "******",
            "messages": "O2M,$messageResponse"
        })
        properties = data_object.properties()
        self.assertEqual(len(properties), 2)
        self.assertEqual(properties[0].name, 'username')
        self.assertIsInstance(properties[0], Field)

        self.assertEqual(properties[1].name, 'messages')
        self.assertIsInstance(properties[1], Relationship)
Beispiel #2
0
 def test_empty_data_object_properties(self):
     data_object = DataObject("$testRequest", {})
     self.assertEqual(data_object.properties(), [])