anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: terminusdb/terminusdb-client-python
Issue: "doc:" wrapping seems wrong

**Describe the bug**
"doc: prefix seems to be using "system:///" which is wrong

**Expected behavior**
converting to what it should be


Changed files:
terminusdb_client/tests/integration_tests/test_client.py, terminusdb_client/woqlclient/woqlClient.py

diff --git a/terminusdb_client/tests/integration_tests/test_client.py b/terminusdb_client/tests/integration_tests/test_client.py
index 9d6ae1f..cddfd15 100644
--- a/terminusdb_client/tests/integration_tests/test_client.py
+++ b/terminusdb_client/tests/integration_tests/test_client.py
@@ -16,10 +16,11 @@ def test_happy_path(docker_url):
     client.connect()
     assert client._connected
     # test create db
-    client.create_database("test_happy_path")
+    client.create_database("test_happy_path", prefixes={"doc": "foo://"})
     init_commit = client._get_current_commit()
     assert client._db == "test_happy_path"
     assert "test_happy_path" in client.list_databases()
+    assert client._context.get("doc") == "foo://"
     # test adding doctype
     WOQLQuery().doctype("Station").execute(client)
     assert client._commit_made == 1
diff --git a/terminusdb_client/woqlclient/woqlClient.py b/terminusdb_client/woqlclient/woqlClient.py
index 6da4f6e..1b73de2 100644
--- a/terminusdb_client/woqlclient/woqlClient.py
+++ b/terminusdb_client/woqlclient/woqlClient.py
@@ -97,12 +97,17 @@ class WOQLClient:
 
         capabilities = self._dispatch_json("get", self._api)
         self._uid = capabilities["@id"]
-        self._context = capabilities["@context"]
+
+        #
         # Get the current user's identifier, if logged in to Hub, it will be their email otherwise it will be the user provided
         if capabilities.get("system:user_identifier"):
             self._author = capabilities["system:user_identifier"]["@value"]
         else:
             self._author = self._user
+
+        if self._db is not None:
+            self._context = self._get_prefixes()
+
         self._commit_made = 0
 
     def close(self) -> None:
@@ -549,6 +554,10 @@ class WOQLClient:
         warnings.warn("set() is deprecated; use connect().", DeprecationWarning)
         self.connect(**kwargs)
 
+    def _get_prefixes(self):
+        """Get the prefixes for a given database"""
+        return self._dispatch_json("get", self._db_base("prefixes")).get("@context")
+
     def create_database(
         self,
         dbid: str,
@@ -609,11 +618,12 @@ class WOQLClient:
 
         self._check_connection(check_db=False)
 
-        self._db = dbid
         self._account = accountid
         self._connected = True
         self._commit_made = 0
+        self._db = dbid
         self._dispatch("post", self._db_url(), details)
+        self._context = self._get_prefixes()
 
     def delete_database(
         self,
Repository: terminusdb/terminusdb-client-python
Issue: [Bug] Logic in WOQLQuery().loadVocabulary

I have some doubt in `WOQLQuery.prototype.loadVocabulary = function(client)` as I test the logic:
```
var result = {}
var v="fg: hello"
var spl = v.split(":");
    if(spl.length == 2 && spl[0] != "_"){
    result[spl[1]] = v;
    }
console.log(result)
```
I got
```
{
hello:"fg: hello"
}
```
Need to fix in WOQLpy accordingly

Changed files:
woqlclient/woql.py

diff --git a/woqlclient/woql.py b/woqlclient/woql.py
index 86581f6..d866d04 100644
--- a/woqlclient/woql.py
+++ b/woqlclient/woql.py
@@ -764,7 +764,7 @@ class WOQLQuery:
                     if type(value) == str:
                         val_spl = value.split(":")
                         if len(val_spl)==2 and val_spl[1] and val_spl[0]!='_':
-                            self.vocab[val_spl[1]] = value
+                            self.vocab[val_spl[0]] = val_spl[1]
 
     def getLimit(self):
         return self.getPagingProperty("limit")