If only the Democratic National Committee operated with as much integrity as the Miss Florida USA pageant.

Each organization has been recently tested for its ability to be an impartial referee.

And only one came through with high marks. Hint: It’s the one with swimsuits.

Debbie Wasserman Schultz, a Broward County congresswoman, lost her title as head of the Democratic National Committee on Sunday. It was two days after Genesis Davila of Miami Beach, the newly-reigning Miss Florida USA 2017, was stripped of her tiara.

Both South Florida women got in trouble for not playing fair.

Under Wasserman Schultz’s leadership, the DNC had been functioning as a not-so-stealthy ally of Hillary Clinton in the surprisingly contested primary with upstart Bernie Sanders.

For those paying attention, the DNC seemed to have its finger on the scale throughout the primary season by keeping as many voters as possible away from Sanders.

Three of the first four debates between Clinton and Sanders were scheduled during low-viewership weekend nights. And Sanders had to sue the DNC to get access to party files and data.

After a rules squabble at a particularly contentious Nevada state convention in May, Sanders chief of staff Jeff Weaver complained that Wasserman Schultz had "been throwing shade at the Sanders campaign since the very beginning."

Wasserman Schultz professed her and her organization’s neutrality in the race.

And she might have been able to maintain that fiction if Wikileaks hadn’t released thousands of internal emails that had been hacked from the DNC computer files.

The weekend disclosure showed a lack of neutrality in the DNC and a willingness to play unfair to help Clinton win.

It’s too bad that Wasserman Schultz wasn’t more like Grant Gravitt, the executive producer of the Miss Florida USA pageant.

Last week, Gravitt found out that one of the 65 contestants in the pageant hadn’t been playing by rules.

During the competition, the contestants are supposed to stay cloistered in their hotel rooms and do their own hair and makeup. But there was talk that Davila, Miss Miami Beach, was slipping away to her mother’s room and using a professional makeup artist and nail technician.

"The little rules are as important as the big rules," Gravitt said. "I lost a golf tournament once because I touched a ball on the green and it cost me a stroke penalty."

So when other contestants complained that the pageant winner had gotten unfair help, Gravitt checked it out.

"It didn’t take a $200-an-hour investigator either," he said. "The funny thing about life in the 2000s is that people will lie to you, but they won’t lie to their own Facebook."

Or Instagram. Davila posted an Instagram photo of her makeup artist working on her eyes during the competition with the caption "working his magic."

Within five days after the pageant — and a night before the show would air on television — Gravitt announced that Davila was stripped of the crown and that the winner would be runner up, Linette De Los Santos, who would now represent Florida in the upcoming 2017 Miss USA pageant.

Davila has hired an attorney to contest her fate. And she still hasn’t turned in her crown.

"Possession of the crown means nothing," Gravitt said. "She hadn’t signed the contract yet."

It’s a messy end to a beauty pageant. But what’s fair is fair, Gravitt said.

"Their defense was that I could just look the other way," Gravitt said. "You try telling that to a judge who is just trying to uphold the laws."

So the lesson here is clear: If you’re after integrity, you’re better off looking at the way we pick beauty queens than presidents.