From 9c5115870dfaf7572e18f3b25ca81a6b03b5ed56 Mon Sep 17 00:00:00 2001 From: Nick Gheorghita Date: Tue, 7 Jul 2020 11:15:11 -0500 Subject: [PATCH] Update deleted github url --- docs/ethpm.rst | 4 ++-- newsfragments/1680.bugfix.rst | 1 + tests/ethpm/test_uri.py | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 newsfragments/1680.bugfix.rst diff --git a/docs/ethpm.rst b/docs/ethpm.rst index 5f323c3431..f8178ee049 100644 --- a/docs/ethpm.rst +++ b/docs/ethpm.rst @@ -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 diff --git a/newsfragments/1680.bugfix.rst b/newsfragments/1680.bugfix.rst new file mode 100644 index 0000000000..4e9da7217d --- /dev/null +++ b/newsfragments/1680.bugfix.rst @@ -0,0 +1 @@ +Update outdated reference url in ethpm docs and tests. diff --git a/tests/ethpm/test_uri.py b/tests/ethpm/test_uri.py index 763cb0f849..99fc88a254 100644 --- a/tests/ethpm/test_uri.py +++ b/tests/ethpm/test_uri.py @@ -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