def test_search_right(self): trie = CCNxTrie() trie.insert("abcd", "foo") trie.insert("abe", "egg") test = trie.search("abe") self.assertTrue(test == "egg")
def test_search_left(self): trie = CCNxTrie() trie.insert("abcd", "foo") trie.insert("aba", "apple") test = trie.search("aba") self.assertTrue(test == "apple")
def test_search(self): trie = CCNxTrie() value = "foo" trie.insert("abcd", value) test = trie.search("abcd") self.assertTrue(test == value)
def test_search_too_long(self): trie = CCNxTrie() trie.insert("abcd", "foo") test = trie.search("abcde") self.assertTrue(test == None)