def test_ask_for_package_list_confirm_eof_error(self): CliDialogHelper.inp = self.eofraiser assert CliDialogHelper.ask_for_package_list_confirm('asd', ['sdf']) is None
def test_ask_for_package_list_confirm_list(self, capsys): sys.stdin = StringIO(u's\ny') CliDialogHelper.ask_for_package_list_confirm(u'foo', [u'bar']) stdout, stderr = capsys.readouterr() assert u'bar' in stdout
def test_ask_for_package_list_confirm_correct(self, choice, expected): sys.stdin = StringIO(choice) assert CliDialogHelper.ask_for_package_list_confirm( u'foo', [u'bar']) is expected
def test_ask_for_package_list_confirm_eof_error(self): CliDialogHelper.inp = self.eofraiser assert CliDialogHelper.ask_for_package_list_confirm('asd', ['sdf']) is None
def test_ask_for_package_list_confirm_list(self, capsys): sys.stdin = StringIO(u's\ny') CliDialogHelper.ask_for_package_list_confirm(u'foo', [u'bar']) stdout, stderr = capsys.readouterr() assert u'bar' in stdout
def test_ask_for_package_list_confirm_correct(self, choice, expected): sys.stdin = StringIO(choice) assert CliDialogHelper.ask_for_package_list_confirm(u'foo', [u'bar']) is expected