Make test more pythonic.