tests: rewrite home keywords test to handle different attributes order (#36515)

This commit is contained in:
Frédéric Péters 2019-11-13 22:23:32 +01:00
parent 1356365a15
commit b97f9a63f0
1 changed files with 2 additions and 2 deletions

View File

@ -221,8 +221,8 @@ def test_home_keywords(pub):
formdef.keywords = 'hello, world'
formdef.store()
home = get_app(pub).get('/')
assert '<div data-keywords="hello ' in home.text or '<div data-keywords="world ' in home.text
assert '<li data-keywords="hello ' in home.text or '<li data-keywords="world ' in home.text
assert home.html.find('div', {'data-keywords': 'hello world'}) or home.html.find('div', {'data-keywords': 'world hello'})
assert home.html.find('li', {'data-keywords': 'hello world'}) or home.html.find('li', {'data-keywords': 'world hello'})
def test_home_formdef_description(pub):
formdef = create_formdef()