Skip to content

Commit 3cc5a72

Browse files
author
Seth Teichman
committed
Prevent generation of multi-source routes in the testing app where both sources are the same
1 parent 7695c2b commit 3cc5a72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flask_parameter_validation/test/testing_application.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def create_app():
2424
app.register_blueprint(get_file_blueprint("file"))
2525
for source_a in multi_source_sources:
2626
for source_b in multi_source_sources:
27-
combined_name = f"ms_{source_a['name']}_{source_b['name']}"
28-
app.register_blueprint(get_multi_source_blueprint([source_a['class'], source_b['class']], combined_name))
27+
if source_a["name"] != source_b["name"]:
28+
# There's no reason to test multi-source with two of the same source
29+
combined_name = f"ms_{source_a['name']}_{source_b['name']}"
30+
app.register_blueprint(get_multi_source_blueprint([source_a['class'], source_b['class']], combined_name))
2931
return app

0 commit comments

Comments
 (0)