Test improvement: Extract text should return all matches
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user