Churches and Christian advocacy groups asked a Texas federal court to declare unconstitutional a provision in the Internal Revenue Code that prevents tax-exempt nonprofits from endorsing political candidates, saying the IRS discriminates against conservative religious groups and churches in applying the law.