Add new text fixture
This commit is contained in:
parent
8f0250c265
commit
085b5b8284
@ -43,3 +43,16 @@ def memgraph(**kwargs) -> Memgraph:
|
||||
|
||||
memgraph.drop_database()
|
||||
memgraph.drop_indexes()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def memgraph_with_text_indexed_data(**kwargs) -> Memgraph:
|
||||
memgraph = Memgraph()
|
||||
|
||||
memgraph.execute_and_fetch("CREATE TEXT INDEX complianceDocuments ON :Document;")
|
||||
|
||||
yield memgraph
|
||||
|
||||
memgraph.execute_and_fetch("DROP TEXT INDEX complianceDocuments;")
|
||||
memgraph.drop_database()
|
||||
memgraph.drop_indexes()
|
||||
|
@ -12,7 +12,7 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
from common import memgraph
|
||||
from common import memgraph, memgraph_with_text_indexed_data
|
||||
|
||||
|
||||
def test_create_index(memgraph):
|
||||
@ -26,36 +26,36 @@ def test_drop_index(memgraph):
|
||||
assert True
|
||||
|
||||
|
||||
def test_text_search_given_property():
|
||||
assert True
|
||||
def test_text_search_given_property(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_text_search_all_properties():
|
||||
assert True
|
||||
def test_text_search_all_properties(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_create_indexed_node():
|
||||
assert True
|
||||
def test_create_indexed_node(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_delete_indexed_node():
|
||||
assert True
|
||||
def test_delete_indexed_node(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_add_indexed_label():
|
||||
assert True
|
||||
def test_add_indexed_label(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_remove_indexed_label():
|
||||
assert True
|
||||
def test_remove_indexed_label(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_add_property_to_indexed_node():
|
||||
assert True
|
||||
def test_add_property_to_indexed_node(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
def test_remove_property_from_indexed_node():
|
||||
assert True
|
||||
def test_remove_property_from_indexed_node(memgraph_with_text_indexed_data):
|
||||
memgraph_with_text_indexed_data.execute_and_fetch("CALL text_search.search('complianceDocuments', 'b') YIELD *;")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user