Skip to content

Commit c66a077

Browse files
Copilotcodingjoe
andcommitted
Add test for non-file input with self-closing tag to cover line 52
Co-authored-by: codingjoe <1772890+codingjoe@users.noreply.github.com>
1 parent f1fea21 commit c66a077

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_forms.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ def test_handles_self_closing_tag(self):
113113
parser.feed('<input type="file" name="test" />')
114114
assert parser.get_html() == '<s3-file name="test">'
115115

116+
def test_preserves_non_file_self_closing_tag(self):
117+
parser = forms.InputToS3FileRewriter()
118+
parser.feed('<input type="text" name="test" />')
119+
assert parser.get_html() == '<input type="text" name="test" />'
120+
116121
def test_preserves_surrounding_elements(self):
117122
parser = forms.InputToS3FileRewriter()
118123
parser.feed('<p><input type="file" name="test"></p>')

0 commit comments

Comments
 (0)