Boris Johnson hopes Hungary will veto a Brexit extension as the Government said in court that he would comply with the law and request one.