def test_ad_with_bad_user_agent(self):
        '''Test that ad page throws Error when user agent is blocked.'''
        rv = self.app.get(
            '/ad' + '?assignmentId=debug' + self.assignment_id + '&workerId=debug' +
            self.worker_id + '&hitId=debug' + self.hit_id + '&mode=sandbox'
        )
        assert '<b>Error</b>: 1014' in rv.data
dataset/ETHPy150Open NYUCCL/psiTurk/test_psiturk.py/BadUserAgent.test_ad_with_bad_user_agent/original