Fix test to check correct locale and make more DRY