def test_register_twice_no_conflict(self):
        class SomeField(object):
            base_name = 'some_field'
            def __init__(self, ref):
                self.ref = ref

        display_fields.FieldRegistry.register_field('some_field', SomeField)
        display_fields.FieldRegistry.register_field('some_field', SomeField)

        reg = display_fields.FieldRegistry()

        field = reg.create('some_field')
        self.assertEqual(0, field.ref)
        self.assertEqual(SomeField, field.__class__)
Convert plain list to instance of this class.
dataset/ETHPy150Open rbarrois/mpdlcd/tests/test_display_fields.py/FieldRegistryTestCase.test_register_twice_no_conflict--crossover with--dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/ext/mutable.py/MutableList.coerce