The Conservatives are looking to defend a seat in Scotland the jailing of a local councillor triggered a by-election.