# Django imports. from django.test import TestCase # Application imports. from conntrackt.forms import EntityForm class EntityFormTest(TestCase): """ Tests for the custom Entity model form. """ def test_styling(self): """ Test that the form styling is set-up correctly. """ form = EntityForm() self.assertIn("span6", form.fields["name"].widget.attrs["class"]) self.assertIn("span6", form.fields["description"].widget.attrs["class"]) self.assertIn("span6", form.fields["project"].widget.attrs["class"]) self.assertIn("span6", form.fields["location"].widget.attrs["class"])