wicked approch,
You do not need a special visa to sit exams, gain ratings, or fly a light aircraft in the UK.
We do not have an M-1 style visa for trainee pilots as flight training is vocational in nature and FTOs are not HE institutions.
All you need is a tourist (visitors) visa to enter the UK.
Either apply for a 3 or 6 month multiple entry visa and your good to go.