Improve unit tests for models module