-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c031f0
commit 6a0f7c5
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
import pinecone | ||
|
||
class TestManage: | ||
|
||
def test_get_api_instance_without_host(self): | ||
pinecone.init(api_key="123-456-789", environment="my-environment") | ||
api_instance = pinecone.manage._get_api_instance() | ||
assert api_instance.api_client.configuration.host == "https://controller.my-environment.pinecone.io" | ||
|
||
def test_get_api_instance_with_host(self): | ||
pinecone.init(api_key="123-456-789", environment="my-environment", host="my-host") | ||
api_instance = pinecone.manage._get_api_instance() | ||
assert api_instance.api_client.configuration.host == "my-host" | ||
|