Skip to content

Commit 9ff8aa6

Browse files
Add schema false (terminusdb#425)
* Add schema false * Fix tests
1 parent 3919356 commit 9ff8aa6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

terminusdb_client/client/Client.py

+2
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,8 @@ def create_database(
698698
details["comment"] = ""
699699
if include_schema:
700700
details["schema"] = True
701+
else:
702+
details["schema"] = False
701703
if prefixes:
702704
details["prefixes"] = prefixes
703705
if team is None:

terminusdb_client/tests/test_Client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_create_database(mocked_requests, mocked_requests2):
7272
client._session.post.assert_called_once_with(
7373
"http://localhost:6363/api/db/admin/myFirstTerminusDB",
7474
auth=("admin", "root"),
75-
json={"label": "my first db", "comment": "my first db comment"},
75+
json={"label": "my first db", "comment": "my first db comment", "schema": False},
7676
headers={"user-agent": f"terminusdb-client-python/{__version__}"},
7777
)
7878

@@ -114,7 +114,7 @@ def test_create_database_and_change_team(mocked_requests, mocked_requests2):
114114
client._session.post.assert_called_once_with(
115115
"http://localhost:6363/api/db/my_new_team/myFirstTerminusDB",
116116
auth=("admin", "root"),
117-
json={"label": "my first db", "comment": "my first db comment"},
117+
json={"label": "my first db", "comment": "my first db comment", "schema": False},
118118
headers={"user-agent": f"terminusdb-client-python/{__version__}"},
119119
)
120120

0 commit comments

Comments
 (0)