Fix typo in common utility function for tests
Add tests for computed attributes.
Fix flake8 warnings.