diff --git a/conntrackt/tests/test_forms.py b/conntrackt/tests/test_forms.py --- a/conntrackt/tests/test_forms.py +++ b/conntrackt/tests/test_forms.py @@ -0,0 +1,23 @@ +# 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"])