Skip to content

Commit

Permalink
Merge pull request #1680 from njgheorghita/ethpm-v3-merge-bugfix
Browse files Browse the repository at this point in the history
Update outdated github url reference
  • Loading branch information
njgheorghita authored Jul 7, 2020
2 parents b680d52 + 9c51158 commit 76e5513
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/ethpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ A valid content-addressed Github URI *must* conform to the following scheme, as

>>> from ethpm.uri import create_content_addressed_github_uri

>>> owned_github_api_uri = "https://api.github.com/repos/ethereum/web3.py/contents/ethpm/assets/owned/1.0.1.json"
>>> content_addressed_uri = "https://api.github.com/repos/ethereum/web3.py/git/blobs/a7232a93f1e9e75d606f6c1da18aa16037e03480"
>>> owned_github_api_uri = "https://api.github.com/repos/ethpm/ethpm-spec/contents/examples/owned/1.0.0.json"
>>> content_addressed_uri = "https://api.github.com/repos/ethpm/ethpm-spec/git/blobs/8f9dc767d4c8b31fec4a08d9c0858d4f37b83180"

>>> actual_blob_uri = create_content_addressed_github_uri(owned_github_api_uri)
>>> assert actual_blob_uri == content_addressed_uri
Expand Down
1 change: 1 addition & 0 deletions newsfragments/1680.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update outdated reference url in ethpm docs and tests.
4 changes: 2 additions & 2 deletions tests/ethpm/test_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_is_valid_content_addressed_github_uri(uri, expected):


def test_create_github_uri():
api_uri = "https://api.github.com/repos/ethereum/web3.py/contents/ethpm/assets/owned/1.0.1.json"
expected_blob_uri = "https://api.github.com/repos/ethereum/web3.py/git/blobs/a7232a93f1e9e75d606f6c1da18aa16037e03480" # noqa: E501
api_uri = "https://api.github.com/repos/ethpm/ethpm-spec/contents/examples/owned/1.0.0.json"
expected_blob_uri = "https://api.github.com/repos/ethpm/ethpm-spec/git/blobs/8f9dc767d4c8b31fec4a08d9c0858d4f37b83180" # noqa: E501
actual_blob_uri = create_content_addressed_github_uri(api_uri)
assert actual_blob_uri == expected_blob_uri

Expand Down

0 comments on commit 76e5513

Please sign in to comment.