Fix unit tests for 3.2 compatibility