more elegant handling of boolean expected values in python unit tests