def _trycompletions_inner(self, inputstring, immediate='', choices=(),
                              other_choices_ok=False,
                              split_completed_lines=True):
        completed = self._get_completions(inputstring,
                                         split_completed_lines=split_completed_lines)

        if immediate:
            msg = 'cqlsh completed %r, but we expected %r' % (completed, immediate)
            self.assertEqual(completed, immediate, msg=msg)
            return

        if other_choices_ok:
            self.assertEqual(set(choices), completed.intersection(choices))
        else:
            self.assertEqual(set(choices), set(completed))
Test tab completion in cqlsh. Enters in the text in inputstring, then
dataset/ETHPy150Open francelabs/datafari/cassandra/pylib/cqlshlib/test/test_cqlsh_completion.py/CqlshCompletionCase._trycompletions_inner