diff --git a/tests/test_pagure_flask_ui_app.py b/tests/test_pagure_flask_ui_app.py
index 4ed0f56..f64e3b0 100644
--- a/tests/test_pagure_flask_ui_app.py
+++ b/tests/test_pagure_flask_ui_app.py
@@ -638,9 +638,15 @@ class PagureFlaskApptests(tests.Modeltests):
output_text = output.get_data(as_text=True)
self.assertIn(
'
foo\'s settings - Pagure', output_text)
- self.assertIn(
- '', output_text)
+ if self.get_wtforms_version() >= (2, 2):
+ self.assertIn(
+ '',
+ output_text)
+ else:
+ self.assertIn(
+ '', output_text)
csrf_token = self.get_csrf(output=output)
@@ -684,9 +690,15 @@ class PagureFlaskApptests(tests.Modeltests):
self.assertIn('Public ssh key updated', output_text)
self.assertIn(
'foo\'s settings - Pagure', output_text)
- self.assertIn(
- '