Tests for validate_image added

Implemented mock_treq that mocks treq with given arguments