Bethenny Frankel and ex-husband Jason Hoppy.Photo: Raymond Hall/GC Images; Turgeon-Steffman / Splash

Bethenny-Frankel-Jason-Hoppy

Bethenny Frankeljust scored a victory in her custody battle againstJason Hoppy.

TheReal Housewives of New York Citystar and her ex-husband both appeared in court in New York City on Monday, when a judge shut down Hoppy’s request that Frankel undergo drug and alcohol testing as they fight for custody of 8-year-old daughterBryn, PEOPLE confirms.

“She is allowed to occasionally go and drink without her daughter present,” Judge Michael Katz said, according toRadarOnline, which was the first to report the news. “What exactly is your claim? That she goes out and occasionally has a drink, because that’s not illegal.”

Katz eventually ruled there wasn’t sufficient evidence to order drug and alcohol testing, telling Hoppy, “I think you are trying to exploit Ms. Frankel to embarrass her. The appeal is denied.”

Hoppy and his legal team had argued Frankel’sdrinking on the Bravo show—and the apparent fatal overdose of her on-off boyfriendDennis Shieldsin August — should require her to submit to an emergency drug test, previously citing“downright dangerous parenting.”

Frankel’s lawyer, however, insisted that she had no evidence that Shields had a drug problem, adding that her on-screen drinking was simply entertainment for the show.

“With respect to Dennis, the judge said [Hoppy and his team] were trying to use his death to their advantage,” a source familiar with the case tells PEOPLE. “The clear implication being that it was inappropriate that they were trying to use that tragedy.”

Frankel isseeking primary custody and full decision-making powerover Bryn, but Hoppy wants to keep the current joint custody arrangement the same. The custody trial is scheduled for March 2019.

While Hoppy’s attorney Robert Wallack claims that they “asked Bethenny privately to voluntarily submit to drug and alcohol testing” and “she refused,” Frankel’s attorney Allan Mayefsky maintains that there was “no basis for the request.”

“It is intrusive and carries a negative implication no matter the result,” he tells PEOPLE. “The law does not require these tests without a reasonable basis. [There is] none here. We considered this request more harassment from Jason.”

Regarding Wallace’s claim that Frankel’s relationship with Shields created “legitimate cause for concern,” Mayefsky says, “There was not one instance alleged of anything done with Mr. Shields with Bryn, or otherwise, that would have been of concern.”

RELATED VIDEO:Bethenny FrankelSays She ‘Never Knows Exactly’ Where Relationship Stands with Dennis Shields

Though they met almost 30 years ago, Frankel and Shields began datingon and offin 2016. He was foundfound deadof asuspected overdosein his Trump Tower apartment on Aug. 10. He was 51.

The New York City Medical Examiner’s Office later announced that an autopsywas not performedon his body due to a “religious objection.” Thus, his cause of death has been ruled “undetermined.”

source: people.com