Fix Pylint: W0201: attribute-defined-outside-init

LoginEnrollmentTestCase.setup_user: Attribute 'user' defined outside __init__
Fix Pylint: W0110: (deprecated-lambda)

divide_chemical_expression: map/filter on lambda could be replaced by
comprehension