diff --git a/tests/test_bootstrap_button.py b/tests/test_bootstrap_button.py index 1567d22f..e90eebd5 100644 --- a/tests/test_bootstrap_button.py +++ b/tests/test_bootstrap_button.py @@ -73,36 +73,41 @@ def test_button_hyphenate_attributes(self): self.render("{% bootstrap_button 'button' href='#' %}"), 'button', ) - # Default: data prefix + + # Default prefix: data self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' %}"), 'button', ) - # Default: no hx prefix + + # Default prefix: no hx self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' hx_xyz='abc' %}"), 'button', ) - # Custom: data and hx + + # Custom prefix: data and hx with self.settings(BOOTSTRAP5={"hyphenate_attribute_prefixes": ["data", "hx"]}): self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' hx_xyz='abc' %}"), 'button', ) - # Custom: hx only + + # Custom prefix: hx only with self.settings(BOOTSTRAP5={"hyphenate_attribute_prefixes": ["hx"]}): self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' hx_xyz='abc' %}"), 'button', ) - # Custom: empty list + + # Custom prefix: empty list with self.settings(BOOTSTRAP5={"hyphenate_attribute_prefixes": []}): self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' hx_xyz='abc' %}"), 'button', ) - # Custom: None + # Custom prefix: None with self.settings(BOOTSTRAP5={"hyphenate_attribute_prefixes": None}): self.assertHTMLEqual( self.render("{% bootstrap_button 'button' href='#' data_foo='bar' hx_xyz='abc' %}"),