def test_get_completion(self):
        """
        Test the get_completion method
        """
        self.test_add_line_to_index()
        key, seed = get_random_key_and_seed(self.client, prefix=self.prefix)
        if STOP not in seed:
            assert get_completion(self.client, key) is not None
        else:
            assert get_completion(self.client, key) is None
        key = "test:i:ate"
        assert ["a", "one"] in get_completion(self.client, key)
        #ensure that exclude works as expected
        assert get_completion(self.client, key, exclude=["a",]) == "one"
        assert get_completion(self.client, key, exclude=["a","one"]) is None

        #ensure that relevant_terms works as well
        assert get_completion(self.client, key, relevant_terms=["one",]) == "one"
dataset/ETHPy150Open wieden-kennedy/python-markov/markov/tests.py/TestMarkovFunctions.test_get_completion/swapped operands of `in`