

def test_to_sensor_db_model_no_trigger_types(self):
    sensor_meta = {
        'artifact_uri': 'file:///data/st2contrib/packs/jira/sensors/jira_sensor.py',
        'class_name': 'JIRASensor',
        'pack': 'jira',
    }
    sensor_api = SensorTypeAPI(**sensor_meta)
    sensor_model = SensorTypeAPI.to_model(sensor_api)
    self.assertEqual(sensor_model.name, sensor_meta['class_name'])
    self.assertEqual(sensor_model.pack, sensor_meta['pack'])
    self.assertEqual(sensor_model.artifact_uri, sensor_meta['artifact_uri'])
    self.assertListEqual(sensor_model.trigger_types, [])

dataset/ETHPy150Open StackStorm/st2/st2common/tests/unit/test_sensor_type_utils.py SensorTypeUtilsTestCase.test_to_sensor_db_model_no_trigger_types/original