The European Union's top human rights agency is criticizing the Czech Republic for its practice of using a "sexual arousal" test to see if refugee claimants are telling the truth when they claim to be gay.

According to a report released last week by the EU's Fundamental Rights Agency, refugees claiming to be gay have been subjected to "phallometric testing," a process in which sensors are attached to the penis, and the subject is then shown straight porn.

"Those applicants who become aroused are denied asylum," reports the BBC. If the sensor picks up no movement, the Czech government considers the person to be gay and refugee status is granted.

The FRA sees numerous problems with this. The practice may break the European human rights code's rule that "no one shall be subjected to torture or to inhuman or degrading treatment or punishment," the organization says in its report.

Furthermore, the test is useless for bisexual individuals, the report notes, and obviously cannot be applied to gay women.

Like many Western countries, the Czech Republic allows gay people to claim refugee status if they come from a country known to persecute LGBT persons. But fearing that this would be a loophole for any visitor wanting to stay in picturesque Prague, the country established the test in an effort to weed out dishonest claimants.

In a statement released this week, the Czech foreign ministry defended the tests, noting that they have been used fewer than 10 times so far, and are only used with the written consent of the refugee claimant. However, the FRA argues that, even though refugee claimants are allowed to refuse, they likely would feel pressured into accepting the test because of fears they would be denied refugee status if they refused.

Critics of phallometric testing say the procedure is flawed and does not correctly determine a person's sexual inclinations.

Nonetheless, the method is used in some jurisdictions to determine the proclivities of sex offenders. Most recently, controversy erupted in the Canadian province of British Columbia when it emerged the tests were being used on teenage boys convicted of sex crimes.

In the US, although courts have generally rejected the tests as unreliable, they are commonly used on sex offenders after conviction.