-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use immutibility pattern for release_cmd and add test for ipfs pin
- Loading branch information
1 parent
e105e06
commit c176265
Showing
2 changed files
with
23 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import json | ||
from ethpm_cli._utils.ipfs import pin_local_manifest | ||
|
||
|
||
def test_pin_local_manifest(test_assets_dir): | ||
local_manifest_path = test_assets_dir / "owned" / "1.0.0.json" | ||
expected_manifest = json.loads( | ||
local_manifest_path.read_text() | ||
) | ||
(package_name, package_version, manifest_uri) = pin_local_manifest(local_manifest_path) | ||
assert package_name == expected_manifest["package_name"] | ||
assert package_version == expected_manifest["version"] | ||
assert manifest_uri == "ipfs://QmbeVyFLSuEUxiXKwSsEjef6icpdTdA4kGG9BcrJXKNKUW" |