简单测试

from django.test import TestCase
from myapp.forms import MyForm

class MyAppTests(TestCase):
    def test_forms(self):
        form_data = {'field1': 'fieldvalue1'}
        form = MyForm(data=form_data)
        self.assertTrue(form.is_valid())