2020from django_bird .templatetags .tags .bird import do_bird
2121from tests .utils import TestComponent
2222from tests .utils import TestComponentCase
23+ from tests .utils import normalize_whitespace
2324
2425
2526class TestTagParsing :
@@ -153,9 +154,7 @@ def test_attrs_do_bird(self, params, expected_attrs):
153154 ],
154155 ids = lambda x : x .description ,
155156 )
156- def test_basic_name_templatetag (
157- self , test_case , templates_dir , normalize_whitespace
158- ):
157+ def test_basic_name_templatetag (self , test_case , templates_dir ):
159158 test_case .component .create (templates_dir )
160159
161160 template = Template (
@@ -165,7 +164,7 @@ def test_basic_name_templatetag(
165164
166165 assert normalize_whitespace (rendered ) == test_case .expected
167166
168- def test_nested_name_templatetag (self , templates_dir , normalize_whitespace ):
167+ def test_nested_name_templatetag (self , templates_dir ):
169168 test_case = TestComponentCase (
170169 description = "Nested component name" ,
171170 component = TestComponent (
@@ -254,9 +253,7 @@ def test_nested_name_templatetag(self, templates_dir, normalize_whitespace):
254253 ],
255254 ids = lambda x : x .description ,
256255 )
257- def test_dynamic_name_template_context_templatetag (
258- self , test_case , templates_dir , normalize_whitespace
259- ):
256+ def test_dynamic_name_template_context_templatetag (self , test_case , templates_dir ):
260257 test_case .component .create (templates_dir )
261258
262259 template = Template (
@@ -266,7 +263,7 @@ def test_dynamic_name_template_context_templatetag(
266263
267264 assert normalize_whitespace (rendered ) == test_case .expected
268265
269- def test_dynamic_name_with_string (self , templates_dir , normalize_whitespace ):
266+ def test_dynamic_name_with_string (self , templates_dir ):
270267 button = TestComponent (
271268 name = "button" ,
272269 content = """
@@ -299,7 +296,7 @@ def test_nonexistent_name_templatetag(self, templates_dir):
299296 template .render (Context ({}))
300297
301298
302- def test_self_closing_tag (templates_dir , normalize_whitespace ):
299+ def test_self_closing_tag (templates_dir ):
303300 test_case = TestComponentCase (
304301 component = TestComponent (
305302 name = "image" ,
@@ -359,7 +356,7 @@ class TestAttributes:
359356 ],
360357 ids = lambda x : x .description ,
361358 )
362- def test_basic (self , test_case , templates_dir , normalize_whitespace ):
359+ def test_basic (self , test_case , templates_dir ):
363360 test_case .component .create (templates_dir )
364361
365362 template = Template (test_case .template_content )
@@ -424,7 +421,7 @@ def test_basic(self, test_case, templates_dir, normalize_whitespace):
424421 ],
425422 ids = lambda x : x .description ,
426423 )
427- def test_boolean (self , test_case , templates_dir , normalize_whitespace ):
424+ def test_boolean (self , test_case , templates_dir ):
428425 test_case .component .create (templates_dir )
429426
430427 template = Template (test_case .template_content )
@@ -493,9 +490,7 @@ def test_boolean(self, test_case, templates_dir, normalize_whitespace):
493490 ],
494491 ids = lambda x : x .description ,
495492 )
496- def test_dynamic_template_context (
497- self , test_case , templates_dir , normalize_whitespace
498- ):
493+ def test_dynamic_template_context (self , test_case , templates_dir ):
499494 test_case .component .create (templates_dir )
500495
501496 template = Template (test_case .template_content )
@@ -553,9 +548,7 @@ def test_dynamic_template_context(
553548 ],
554549 ids = lambda x : x .description ,
555550 )
556- def test_nested_template_context (
557- self , test_case , templates_dir , normalize_whitespace
558- ):
551+ def test_nested_template_context (self , test_case , templates_dir ):
559552 test_case .component .create (templates_dir )
560553
561554 template = Template (test_case .template_content )
@@ -625,7 +618,7 @@ def test_nested_template_context(
625618 ],
626619 ids = lambda x : x .description ,
627620 )
628- def test_error_handling (self , test_case , templates_dir , normalize_whitespace ):
621+ def test_error_handling (self , test_case , templates_dir ):
629622 test_case .component .create (templates_dir )
630623
631624 template = Template (test_case .template_content )
@@ -646,7 +639,6 @@ def test_data_bird_attributes(
646639 expected ,
647640 override_app_settings ,
648641 templates_dir ,
649- normalize_whitespace ,
650642 ):
651643 button = TestComponent (
652644 name = "button" ,
@@ -729,7 +721,7 @@ class TestProperties:
729721 ],
730722 ids = lambda x : x .description ,
731723 )
732- def test_basic (self , test_case , templates_dir , normalize_whitespace ):
724+ def test_basic (self , test_case , templates_dir ):
733725 test_case .component .create (templates_dir )
734726
735727 template = Template (test_case .template_content )
@@ -805,7 +797,7 @@ def test_basic(self, test_case, templates_dir, normalize_whitespace):
805797 ],
806798 ids = lambda x : x .description ,
807799 )
808- def test_dynamic (self , test_case , templates_dir , normalize_whitespace ):
800+ def test_dynamic (self , test_case , templates_dir ):
809801 test_case .component .create (templates_dir )
810802
811803 template = Template (test_case .template_content )
@@ -874,7 +866,7 @@ def test_dynamic(self, test_case, templates_dir, normalize_whitespace):
874866 ],
875867 ids = lambda x : x .description ,
876868 )
877- def test_error_handling (self , test_case , templates_dir , normalize_whitespace ):
869+ def test_error_handling (self , test_case , templates_dir ):
878870 test_case .component .create (templates_dir )
879871
880872 template = Template (test_case .template_content )
@@ -883,7 +875,7 @@ def test_error_handling(self, test_case, templates_dir, normalize_whitespace):
883875 assert normalize_whitespace (rendered ) == test_case .expected
884876
885877
886- def test_attrs_and_props (templates_dir , normalize_whitespace ):
878+ def test_attrs_and_props (templates_dir ):
887879 test_case = TestComponentCase (
888880 component = TestComponent (
889881 name = "button" ,
@@ -969,7 +961,7 @@ class TestSlots:
969961 ],
970962 ids = lambda x : x .description ,
971963 )
972- def test_default (self , test_case , templates_dir , normalize_whitespace ):
964+ def test_default (self , test_case , templates_dir ):
973965 test_case .component .create (templates_dir )
974966
975967 template = Template (test_case .template_content )
@@ -1065,7 +1057,7 @@ def test_default(self, test_case, templates_dir, normalize_whitespace):
10651057 ],
10661058 ids = lambda x : x .description ,
10671059 )
1068- def test_named (self , test_case , templates_dir , normalize_whitespace ):
1060+ def test_named (self , test_case , templates_dir ):
10691061 test_case .component .create (templates_dir )
10701062
10711063 template = Template (test_case .template_content )
@@ -1159,9 +1151,7 @@ def make_fancy(value):
11591151 ],
11601152 ids = lambda x : x .description ,
11611153 )
1162- def test_with_outside_templatetag (
1163- self , test_case , fancy_filter , templates_dir , normalize_whitespace
1164- ):
1154+ def test_with_outside_templatetag (self , test_case , fancy_filter , templates_dir ):
11651155 test_case .component .create (templates_dir )
11661156
11671157 template = Template (test_case .template_content )
@@ -1170,7 +1160,7 @@ def test_with_outside_templatetag(
11701160 assert normalize_whitespace (rendered ) == test_case .expected
11711161
11721162
1173- def test_nested_components_with_loops (templates_dir , normalize_whitespace ):
1163+ def test_nested_components_with_loops (templates_dir ):
11741164 nav = TestComponent (
11751165 name = "nav" ,
11761166 content = """
@@ -1302,7 +1292,7 @@ def test_nested_components_with_loops(templates_dir, normalize_whitespace):
13021292 ],
13031293 ids = lambda x : x .description ,
13041294)
1305- def test_parent_context_access (test_case , templates_dir , normalize_whitespace ):
1295+ def test_parent_context_access (test_case , templates_dir ):
13061296 test_case .component .create (templates_dir )
13071297
13081298 template = Template (test_case .template_content )
@@ -1394,7 +1384,7 @@ def test_parent_context_access(test_case, templates_dir, normalize_whitespace):
13941384 ],
13951385 ids = lambda x : x .description ,
13961386)
1397- def test_only_flag (test_case , templates_dir , normalize_whitespace ):
1387+ def test_only_flag (test_case , templates_dir ):
13981388 test_case .component .create (templates_dir )
13991389
14001390 template = Template (test_case .template_content )
0 commit comments