def test_get_schema(self): fake_driver_one = make_pod_driver_base() fake_driver_two = make_pod_driver_base() PodDriverRegistry.register_item(fake_driver_one.name, fake_driver_one) PodDriverRegistry.register_item(fake_driver_two.name, fake_driver_two) self.assertItemsEqual( [ { "driver_type": "pod", "name": fake_driver_one.name, "description": fake_driver_one.description, "fields": [], "queryable": fake_driver_one.queryable, "missing_packages": fake_driver_one.detect_missing_packages(), "chassis": True, "can_probe": True, }, { "driver_type": "pod", "name": fake_driver_two.name, "description": fake_driver_two.description, "fields": [], "queryable": fake_driver_two.queryable, "missing_packages": fake_driver_two.detect_missing_packages(), "chassis": True, "can_probe": True, }, ], PodDriverRegistry.get_schema(), )
def test_get_schema(self): fake_driver_one = make_pod_driver_base() fake_driver_two = make_pod_driver_base() PodDriverRegistry.register_item(fake_driver_one.name, fake_driver_one) PodDriverRegistry.register_item(fake_driver_two.name, fake_driver_two) self.assertItemsEqual( [{ 'driver_type': 'pod', 'name': fake_driver_one.name, 'description': fake_driver_one.description, 'fields': [], 'queryable': fake_driver_one.queryable, 'missing_packages': fake_driver_one.detect_missing_packages(), }, { 'driver_type': 'pod', 'name': fake_driver_two.name, 'description': fake_driver_two.description, 'fields': [], 'queryable': fake_driver_two.queryable, 'missing_packages': fake_driver_two.detect_missing_packages(), }], PodDriverRegistry.get_schema())