The vote to pick a new member of Parliament in the ex-prime minister’s once-reliably Conservative district is just one of three by-elections on Thursday that will give a snapshot of Britain’s mood.When Boris Johnson paid a surprise visit last year to the Swallow pub and poured some pints, he seemed to leave the clientele more agreed on his skills as a barman than as a politician.“He asked me whether it was a decent pint — and it was,” said Tony O’Shea, 55, holding up a photo on his phone of the moment he was served a beer by Mr. Johnson, then the prime minister. Still a fan, Mr. O’Shea described Mr. Johnson as a “lovable rogue” whom he had voted for in 2019.On the other side of the pub, however, Jenny Moffatt, 73, had no complaints about the drinks she was served by Mr. Johnson. But she described him as “a buffoon,” with a tendency to “pontificate.”Love him or laugh at him, Mr. Johnson was an outsize presence both in British politics — and here in Uxbridge and South Ruislip, the district of outer London that he represented in Parliament. Now he is gone: He was forced out of Downing Street last summer and chose to resign his seat in Parliament last month after a ruling by senior lawmakers that he had lied to Parliament about lockdown-breaking parties.That leaves voters in his constituency to determine on Thursday what kind of post-Johnson future they prefer — to stick with the Conservatives or flip to Labour. Since the district was created in 2010, there have only been Tory representatives in Parliament but the party now trails badly in national opinion polls.Mr. O’Shea, who runs a cleaning company, said he was unsure for whom he will cast his ballot on Thursday. “There are a lot of people, irrespective of what has happened, who would still vote for Boris because of his character,” he said.It is partly thanks to Mr. Johnson’s tarnished legacy, however, that the current prime minister, Rishi Sunak, faces three unwelcome tests on Thursday in so-called by-elections — contests in local parliamentary districts — that fall at a time of roaring inflation and economic stagnation.As well as Mr. Johnson’s seat on the fringes London, there is a vacancy in Selby and Ainsty, in northern England, where one of Mr. Johnson’s allies, Nigel Adams, also quit. In both these contests, the Labour Party, the main opposition, detects the scent of success.A third contest was called when David Warburton, another Conservative, resigned after admitting he had used cocaine. In the race to succeed him in Somerton and Frome, in southwest England, the centrist Liberal Democrats are seen as the main challengers.Steve Tuckwell, second from left, the Conservative candidate running for a parliamentary seat in Boris Johnson’s former district, at a debate with other candidates this month. Susannah Ireland/Reuters“There is a sense that the by-elections are the end of the Boris Johnson era — this electoral test wouldn’t have happened but for him,” said Robert Hayward, a Conservative member of the House of Lords and a polling expert. He added that, because the three seats are being fought in three very different areas, they will give a rare snapshot of opinion across the country.“For the Conservatives, it will be a challenge and damaging if they lose all three,” said Mr. Hayward, while adding that “if they win even one it would substantially lift their spirits because expectations are so low.”Perhaps surprisingly, given their poor national poll ratings — trailing Labour by around 20 percentage points — the Conservatives are optimistic in Uxbridge and South Ruislip, where in the 2019 general election Mr. Johnson won by a relatively modest majority.However, the party is relying on local issues to buoy them, rather than counting on affection for Mr. Johnson. Indeed, the former prime minister has largely been airbrushed from the Tories’ campaign literature, has not been asked (or offered) to campaign for the new Tory challenger in his former district, Steve Tuckwell, and has had only a brief phone call with him.“Boris Johnson was a marmite politician” said David Simmonds, a Conservative lawmaker in the neighboring area of Ruislip, Northwood and Pinner, referring to a salty, yeasty paste that Britons tend to either love or hate.“There were people here who voted Conservative because they liked Boris Johnson and other people who stopped voting Conservative because they didn’t think he was the right person,” he added. “But that’s history, he’s not on the ballot paper at this election, I think people have moved on a while ago.”The résumé of Mr. Tuckwell is strikingly different from that of Mr. Johnson, who was educated at Eton College, Britain’s most famous private school, and Oxford University. By contrast Mr. Tuckwell stocked shelves at a supermarket as a part-time job when he was young, and then was employed as a postal worker. A protest against plans to extend an ultra low emission zone for vehicles, known as ULEZ, across all London boroughs, in London, in April.Maja Smiejkowska/ReutersMr. Tuckwell’s campaign stresses his local credentials in part because his main rival, the Labour Party’s Danny Beales, is now an elected councilor in Camden, an inner London municipality. (Mr. Beales was born and raised in the Uxbridge and South Ruislip district.)The Conservatives also have a pressing local issue because the mayor of London, Sadiq Khan, a Labour member, plans to extend an ultra low emission zone across all of London’s boroughs, including Uxbridge, effectively levying a fee on drivers of older, more polluting, cars.The plan, known as ULEZ, already operates in central London and aims to improve the quality of the city’s air, which has been found to have contributed to the death of one girl in the city.The threatened new cost has alarmed many drivers in Uxbridge and South Ruislip, and Mr. Tuckwell has likened the scheme to the tactics of a famed highwayman, Dick Turpin, an 18th century figure whose exploits were romanticized after his execution and who, according to legend, may have once lived locally.“After all, Turpin asked for a few shillings — not four-and-a-half grand a year,” Mr. Tuckwell wrote, totaling the cost of using a noncompliant car every day of the year to more than £4,500, or about $5,870.Mr. Beales has been under pressure on the issue and recently said that now is “not the right time” to extend ULEZ because of the squeeze it puts on incomes.But that is not enough to satisfy some. Outside his home, Neil Wingerath said the new rules would cost him £12.50 each time he drove his 13 year-old Land Rover SUV.“I’m not a Conservative but I am persuaded to vote Conservative because of ULEZ,” said Mr. Wingerath, 67, a retired accountant, who added that the resale value of his car had halved since the announcement of the ULEZ expansion to the area. “They are unsellable locally.”Even on this most local of issues, however, there is no escaping the legacy of Mr. Johnson who, in a newspaper article, recently condemned the “sheer bone-headed cruelty,” of the extension of ULEZ to outer London.His critics point out that the policy was introduced in inner London, by none other than Mr. Johnson himself when he served as the city’s mayor. More