示例#1
0
 def test_bad_data_type(self):
     tracked_entity = {
         "orgUnit": 0xabc123,
         "trackedEntityType": 0xdef456
     }
     with self.assertRaises(ConfigurationError):
         validate_tracked_entity(tracked_entity)
示例#2
0
 def test_extra_key(self):
     tracked_entity = {
         "orgUnit": "abc123",
         "trackedEntityType": "def456",
         "hasWensleydale": False
     }
     with self.assertRaises(ConfigurationError):
         validate_tracked_entity(tracked_entity)
示例#3
0
 def test_valid(self):
     """
     validate_tracked_entity() should not raise ConfigurationError
     """
     tracked_entity = {
         "orgUnit": "abc123",
         "trackedEntityType": "def456",
     }
     validate_tracked_entity(tracked_entity)
示例#4
0
 def test_missing_key(self):
     tracked_entity = {
         "trackedEntityType": "def456",
     }
     with self.assertRaises(ConfigurationError):
         validate_tracked_entity(tracked_entity)