The prime minister faces the prospect of losing two Conservative seats after the previous MPs were forced to resign because of scandals.
If the Conservatives lose both, it will increase the pressure on Mr Johnson from within his own party, just a fortnight after he survived a vote of confidence in his leadership.
A by-election is the process for electing a new member of parliament when a seat in the House of Commons becomes available outside of a general election. This could happen, for example, if an MP dies or resigns.
In the case of Wakefield, former Conservative MP Imran Ahmad Khan stood down after being convicted of sexually assaulting a 15-year-old boy in 2008. He was jailed for 18 months.
In Tiverton and Honiton, the seat became available when Tory MP Neil Parish resigned after admitting he had watched pornography on his phone twice while in the Commons chamber.
Wakefield, in West Yorkshire, was part of Labour's "red wall" which fell to the Conservatives in the 2019 general election.
It had been a Labour seat since 1932 but the area voted Leave in the 2016 EU referendum, and the Tories overturned Labour's 2,176-majority in 2019 with the "Get Brexit done" campaign slogan.
By contrast, Tiverton and Honiton in Devon has been a Conservative-voting area since the 1920s, although the seat boundaries have changed several times. The Tories won it with a majority of 24,239 votes in 2019.
The chart above shows how sharp the contrast is between the two constituencies - and just how different the challenge is for the Tories to keep hold of both seats.
On average, voters in Tiverton and Honiton are older and better paid than those in Wakefield, while the Yorkshire constituency has nearly double the rate of people on unemployment benefits.
While pollsters can get it wrong and constituency polling is especially challenging, the polls still don't paint a pretty picture for the Conservatives.
Two recent polls carried out in Wakefield had similar conclusions, with both suggesting that Labour have a lead of some 20 percentage points over the Conservatives.
There hasn't been any recent polling in Tiverton and Honiton, but the Lib Dems say their internal data shows they are trailing the Conservatives by just a couple of percentage points.
While it would be a big upset if the Lib Dems were to win there, they won in similar circumstances in Chesham and Amersham a year ago and in North Shropshire in December - which explains why there is some nervousness in Conservative ranks.
If the Tories were to lose both seats, the defeats would be at both ends of their political spectrum - seats they won from Labour in 2019 and seats that have been Conservative for decades.
If that's the case, nervous Tory MPs may conclude that Mr Johnson's electoral appeal is diminishing after months of coverage of Partygate and the cost-of-living crisis.
If Conservative MPs decide they want to change their leader before the next general election - which by law doesn't have to be held until January 2025 - their options are limited.
Party rules say they can't hold another confidence vote in Mr Johnson for a year after the previous vote, but there has been speculation the rules could be changed to allow another vote sooner.
One thing on the horizon that could make that rule change more likely is a report by Parliament's privileges committee into whether the prime minister misled the House of Commons over Partygate - and that's likely to come in the Autumn.
Results of the by-elections are due in the early hours of 24 June.