Refactor configuration check
Merge pull request #509 from romainneutron/config-test

[3.8] Refactor configuration check