def delete_service(service_id: str = None) -> tuple: if service_id: if ServiceTypeAdapter.exists_in_db(service_id): ServiceTypeAdapter.delete(service_id) return 'Service Deleted', 200 else: return 'Service ID not found', 500 else: PlanServiceTypeAdapter.delete_all() LastOperationAdapter.delete_all() ServiceInstanceAdapter.delete_all() ManifestAdapter.delete_all() ServiceTypeAdapter.delete_all() PlanAdapter.delete_all() return 'Deleted all Services', 200
def test_adapter_delete(self): with self.assertRaises(Exception): ServiceTypeAdapter.delete(id_name='')
def tearDown(self): SQLStore.delete_service_instance(Adapter.get_id(self.test_model)) ServiceTypeAdapter.delete(self.service.id)
def tearDown(self): SQLStore.delete_manifest(self.test_model.id) ServiceTypeAdapter.delete(self.service.id)