Ticket #12896: form_is_valid_side_effects_test.diff

File form_is_valid_side_effects_test.diff, 665 bytes (added by Luke Plant, 15 years ago)

Patch to tests to demonstrate problem.

  • tests/modeltests/model_forms/models.py

     
    580580<option value="3">Third test</option>
    581581</select>  Hold down "Control", or "Command" on a Mac, to select more than one.</li>
    582582>>> f = TestArticleForm({'headline': u'Test headline', 'slug': 'test-headline', 'pub_date': u'1984-02-06', 'writer': u'1', 'article': 'Hello.'}, instance=art)
     583>>> art.slug
     584'test-article'
    583585>>> f.errors
    584586{}
     587>>> art.slug
     588'test-article'
    585589>>> f.is_valid()
    586590True
    587591>>> test_art = f.save()
Back to Top