|
10 | 10 | from terminusdb_client.client.Client import Patch, Client |
11 | 11 | from terminusdb_client.woqlquery.woql_query import WOQLQuery |
12 | 12 |
|
13 | | -# from terminusdb_client.woqlquery.woql_query import WOQLQuery |
14 | | - |
15 | 13 | test_user_agent = "terminusdb-client-python-tests" |
16 | 14 |
|
17 | 15 |
|
@@ -524,67 +522,3 @@ def test_terminusx_crazy_path(terminusx_token): |
524 | 522 | client.delete_database(testdb, "TerminusDBTest") |
525 | 523 | assert client.db is None |
526 | 524 | assert testdb not in client.list_databases() |
527 | | - |
528 | | - |
529 | | -# |
530 | | -# def _generate_csv(option): |
531 | | -# if option == 1: |
532 | | -# file_path = "employee_file.csv" |
533 | | -# with open(file_path, mode="w") as employee_file: |
534 | | -# employee_writer = csv.writer( |
535 | | -# employee_file, delimiter=",", quotechar='"', quoting=csv.QUOTE_MINIMAL |
536 | | -# ) |
537 | | -# employee_writer.writerow(["John Smith", "Accounting", "November"]) |
538 | | -# employee_writer.writerow(["Erica Meyers", "IT", "March"]) |
539 | | -# return file_path |
540 | | -# else: |
541 | | -# file_path = "employee_file.csv" |
542 | | -# with open(file_path, mode="w") as employee_file: |
543 | | -# employee_writer = csv.writer( |
544 | | -# employee_file, delimiter=",", quotechar='"', quoting=csv.QUOTE_MINIMAL |
545 | | -# ) |
546 | | -# employee_writer.writerow(["Cow Duck", "Marketing", "April"]) |
547 | | -# return file_path |
548 | | -# |
549 | | -# |
550 | | -# def _file_clean_up(filename): |
551 | | -# if os.path.exists(filename): |
552 | | -# os.remove(filename) |
553 | | -# |
554 | | -# |
555 | | -# def test_csv_handeling(docker_url): |
556 | | -# client = Client(docker_url) |
557 | | -# assert not client._connected |
558 | | -# # test connect |
559 | | -# client.connect() |
560 | | -# assert client._connected |
561 | | -# # test create db |
562 | | -# client.create_database("test_csv") |
563 | | -# client._get_current_commit() |
564 | | -# assert client._db == "test_csv" |
565 | | -# assert "test_csv" in client.list_databases() |
566 | | -# csv_file_path = _generate_csv(1) # create testing csv |
567 | | -# try: |
568 | | -# client.insert_csv(csv_file_path) |
569 | | -# client.get_csv(csv_file_path, csv_output_name="new_" + csv_file_path) |
570 | | -# assert filecmp.cmp(csv_file_path, "new_" + csv_file_path) |
571 | | -# csv_file_path = _generate_csv(2) |
572 | | -# client.update_csv(csv_file_path) |
573 | | -# client.get_csv(csv_file_path, csv_output_name="update_" + csv_file_path) |
574 | | -# assert not filecmp.cmp("new_" + csv_file_path, "update_" + csv_file_path) |
575 | | -# finally: |
576 | | -# _file_clean_up(csv_file_path) |
577 | | -# _file_clean_up("new_" + csv_file_path) |
578 | | -# _file_clean_up("update_" + csv_file_path) |
579 | | -# |
580 | | - |
581 | | -# def test_create_graph(docker_url): |
582 | | -# client = Client(docker_url) |
583 | | -# assert not client._connected |
584 | | -# # test connect |
585 | | -# client.connect() |
586 | | -# assert client._connected |
587 | | -# # test create db |
588 | | -# client.create_database("test_graph") |
589 | | -# client.create_graph("instance", "test-one-more-graph", "create test graph") |
590 | | -# client.delete_graph("instance", "test-one-more-graph", "delete test graph") |
0 commit comments