-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add getManifestHash function for python/typescript sdk. Allow docker-…
…network URLs. (#857) * Add get_manifest_hash function to escrow * Add getManifestHash function to typescript sdk * Extend validators.url to allow docker URLs
- Loading branch information
Showing
7 changed files
with
175 additions
and
9 deletions.
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
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
15 changes: 15 additions & 0 deletions
15
packages/sdk/python/human-protocol-sdk/test/human_protocol_sdk/test_utils.py
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 unittest | ||
from validators.utils import ValidationFailure | ||
|
||
from human_protocol_sdk.utils import validate_url | ||
|
||
|
||
class TestStorageClient(unittest.TestCase): | ||
def test_validate_url_with_valid_url(self): | ||
self.assertTrue(validate_url("https://valid-url.tst/valid")) | ||
|
||
def test_validate_url_with_docker_network_url(self): | ||
self.assertTrue(validate_url("http://test:8000/valid")) | ||
|
||
def test_validate_url_with_invalid_url(self): | ||
assert isinstance(validate_url("htt://test:8000/valid"), ValidationFailure) |
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
a4ad466
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
job-launcher-server – ./packages/apps/job-launcher/server
job-launcher-server-humanprotocol.vercel.app
job-launcher-server-nine.vercel.app
job-launcher-server-git-develop-humanprotocol.vercel.app