Test improvement: Extract text should return all matches

This commit is contained in:
dgtlmoon
2022-07-10 20:05:48 +02:00
parent 2f636553a9
commit 2ba3a6d53f
2 changed files with 22 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ def set_modified_response():
</br>
So let's see what happens. </br>
<div id="sametext">Some text thats the same</div>
<div id="changetext">Some text that did change ( 1000 online <br/> 80 guests)</div>
<div id="changetext">Some text that did change ( 1000 online <br/> 80 guests<br/> 2000 online )</div>
</body>
</html>
"""
@@ -119,9 +119,12 @@ def test_check_filter_and_regex_extract(client, live_server):
# Class will be blank for now because the frontend didnt apply the diff
assert b'<div class="">1000 online' in res.data
# All regex matching should be here
assert b'<div class="">2000 online' in res.data
# Both regexs should be here
assert b'<div class="">80 guests' in res.data
# Should not be here
assert b'Some text that did change' not in res.data
assert b'Some text that did change' not in res.data