Fix mismatch error due to map in python3

When executed by python3 the test failed on a mismatch_error
caused by the fact that map function works differently in
python3.
The review fixes the issue by rewriting the line filtering
extensions to list comprehension.

Closes-Bug: #1829475

Change-Id: Ic2db882e505e7992192767acbe12a153b2d879e9
1 file changed