def generate_job_request(self, submitted=True, accepted=True):
        current_request = super(ClientTest, self).generate_job_request()
        if submitted or accepted:
            self.connection_manager.establish_request_connection(current_request)
            self.command_handler.send_job_request(current_request)

        if submitted and accepted:
            self.command_handler.recv_command(GEARMAN_COMMAND_JOB_CREATED, job_handle=current_request.job.handle)
            self.assert_(current_request.job.handle in self.command_handler.handle_to_request_map)

        return current_request
dataset/ETHPy150Open YelpArchive/python-gearman/tests/client_tests.py/ClientTest.generate_job_request/original