Example #1
0
 def test_1330(self, cn_client_v2):
     """do_update(): Task is added to queue"""
     cli = d1_cli.impl.cli.CLI()
     with d1_test.d1_test_case.capture_std() as (out_stream, err_stream):
         with self._add_write_operation_to_queue(
                 cli, cli.do_update, 'old_pid {pid} {tmp_file_path}'):
             self._assert_queued_operations(cli, 1, 'update')
             with d1_test.d1_test_case.mock_input('yes'):
                 cli.do_clearqueue('')
             self._assert_queue_empty(cli)
     assert 'You are about to clear' in out_stream.getvalue()
Example #2
0
 def _clear_queue(self, cli):
     with d1_test.d1_test_case.capture_std() as (out_stream, err_stream):
         with d1_test.d1_test_case.mock_input('yes'):
             cli.do_clearqueue('')
         assert 'You are about to clear' in out_stream.getvalue()