Dean Obeidallah, a former attorney, is the host of SiriusXM radio's daily program "The Dean Obeidallah Show" and a columnist for The Daily Beast. Follow him @deanofcomedy. The opinions expressed in this commentary are his.

(CNN) Donald Trump was not on the ballot in Virginia's race for governor on Tuesday, but his bigoted political playbook certainly was. And thankfully the voters of Virginia sent a message that they reject Trump's fearmongering and divisiveness by electing Democrat Ralph Northam .

Let's not play games: Trump, his party and his former top adviser, Steve Bannon, were all very invested in the GOP nominee, Ed Gillespie. Not only had Trump tweeted numerous times over the past month supporting Gillespie, including on Election Day, but over the weekend Bannon was publicly bragging that Gillespie would win because he had embraced "Trump's agenda" and "the Trump-Stewart talking points," referring to Corey Stewart, who almost upset Gillespie in the primary.

Well, Bannon was right about one thing, Gillespie did embrace Trump's agenda. In September, Gillespie went through a metamorphosis. But instead of a caterpillar turning into a beautiful butterfly, Gillespie transformed from a mainstream Republican into a Trump clone complete with racist dog whistles and more.

What makes this transformation so stark is that before his primary campaign against Stewart -- a "mini-Trump" who channeled his anti-immigrant and pro-confederate statues philosophy -- Gillespie, a former Republican National committee chairman and lobbyist, had, as far back as 2006, criticized Republicans who had spewed anti-immigrant views.

But that all changed this fall, when "Establishment Ed," as Stewart had mockingly nicknamed Gillespie during the primary, started running ads that in Trumpesque fashion scared voters into believing that Latino street gangs were coming to kill them and their families. In fact, Gillespie cited the identical street gang, MS-13, that Trump is fond of invoking. And just like Trump, Gillespie hyped up the threat to the point that Washington Post fact checkers deemed it a " two Pinocchios " exaggeration.

And in October, we saw Gillespie echoing Trump's post-Charlottesville defense of Confederate statues and running ads saying, "I'm for keeping them up and he's for taking them down," referring to his Democratic opponent, Northam.

In fact, it almost seemed like Gillespie and Trump had coordinated their messaging over the last month of the campaign on these inflammatory issues. For example, in October, Trump praised Gillespie, tweeting : "Ed Gillespie will turn the really bad Virginia economy #'s around, and fast. Strong on crime, he might even save our great statues/heritage!"

And on Election Day, Trump took a break from his Asia trip to unleash a series of tweets supporting Gillespie, including one specifically citing the Latino street gang MS-13: "@EdWGillespie will totally turn around the high crime and poor economic performance of VA. MS-13 and crime will be gone. Vote today, ASAP!"

But Trump and the GOP's support for Gillespie went far beyond tweets. No matter what Trump tweeted about Gillespie on election night -- that he "worked hard" but didn't embrace what Trump stands for -- there's little doubt that Trump, as a GOP president, is a big reason why the Republican leadership went "all in" on this race , with the Republican Governors Association giving his campaign over $8 million, according to the nonpartisan Virginia Public Access Project.

Join us on Twitter and Facebook

Trump and the GOP apparently were using Virginia as a test lab. They wanted to see if Trump's race-baiting political playbook, updated to include the local issue of Confederate statues, would work to flip a state that Trump lost by 5 points last November. But thankfully the people of Virginia said no. If Gillespie had won, there's no doubt other Republicans would've mimicked the same strategy in 2018, since politicians tend to copy formulas that work.

Does this mean Trump's tactics of dividing Americans against each other, ginning up fear of immigrants and appealing to white supremacy are dead come the 2018 elections? Not by a long shot. But it may make some Republicans think twice before going full Trump. And at the very least, the people of Virginia made it clear that they reject Trump's bigoted political playbook.