When I run tests I get following error: AttributeError: 'LogRecord' object has no attribute 'duration'