Skip to content

Commit

Permalink
Adding test for field_class param
Browse files Browse the repository at this point in the history
  • Loading branch information
sanchezfauste authored Nov 13, 2023
1 parent 1a47a59 commit 4766e03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_bootstrap_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def test_placeholder(self):
self.assertIn('type="text"', html)
self.assertIn('placeholder="placeholdertest"', html)

def test_field_class(self):
html = self.render("{% bootstrap_field form.subject field_class='field-class-test' %}", {"form": SubjectTestForm()})
self.assertIn('class="form-control field-class-test"', html)

def test_xss_field(self):
html = self.render("{% bootstrap_field form.xss_field %}", {"form": XssTestForm()})
self.assertIn('type="text"', html)
Expand Down

0 comments on commit 4766e03

Please sign in to comment.