# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division

from treemap.lib.udf import udf_create
from treemap.tests.test_udfs import UdfCRUTestCase


class UdfGenericCreateTest(UdfCRUTestCase):
    def test_non_treemap_model(self):
        self.instance.map_feature_types += ['Bioswale']
        self.instance.save()

        body = {'udf.name': 'Testing choice',
                'udf.model': 'Bioswale',
                'udf.type': 'string'}

        udf_create(body, self.instance)

@@ -554,8 +554,236 @@
 stance)%0A
+%0A        # teardown, for the sake of other tests that look at map_feature_types%0A        self.instance.map_feature_types = %5B%0A            t for t in self.instance.map_feature_types if t != 'Bioswale'%5D%0A        self.instance.save()%0A

Add cleanup to fix tests