Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/m/p/mpdlcd-0.4.0/tests/test_display_fields.py   mpdlcd(Download)
        reg = display_fields.FieldRegistry()
 
        field = reg.create('some_field')
        self.assertEqual(0, field.ref)
        self.assertEqual(SomeField, field.__class__)
        reg = display_fields.FieldRegistry()
 
        field = reg.create('some_field')
        self.assertEqual(0, field.ref)
        self.assertEqual(SomeField, field.__class__)
 
        field2 = reg.create('some_field')
        reg = display_fields.FieldRegistry()
 
        field = reg.create('some_field')
        self.assertEqual(0, field.ref)
        self.assertEqual(2, field.foo)
        self.assertEqual(SomeField, field.__class__)
 
        field2 = reg.create('some_field', foo=4)