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

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

src/d/j/django-cached-modelforms-0.2.1/cached_modelforms/tests/test_forms.py   django-cached-modelforms(Download)
        ``CachedModelChoiceField.objects``.
        '''
        form = self.ModelFormSingle({'fk_field': unicode(self.obj1.pk),
                                     'name': u'Name1'})
        self.assertTrue(
 
        # loading back
        form = self.ModelFormSingle(instance=new_obj)
        self.assertEqual(form.initial['fk_field'], self.obj1.pk)
 
 
        # loading back
        form = self.ModelFormSingle(instance=new_obj)
        self.assertEqual(
            set(form.initial['m2m_field']),

src/d/j/django-cached-modelforms-HEAD/cached_modelforms/tests/test_forms.py   django-cached-modelforms(Download)
        ``CachedModelChoiceField.objects``.
        '''
        form = self.ModelFormSingle({'fk_field': unicode(self.obj1.pk),
                                     'name': u'Name1'})
        self.assertTrue(
 
        # loading back
        form = self.ModelFormSingle(instance=new_obj)
        self.assertEqual(form.initial['fk_field'], self.obj1.pk)
 
 
        # loading back
        form = self.ModelFormSingle(instance=new_obj)
        self.assertEqual(
            set(form.initial['m2m_field']),