diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-20 19:56:09 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-20 19:56:09 -0700 | 
| commit | 7815c6739e4ae730c7fe4589e8aa15b2b0f1033d (patch) | |
| tree | 6ed0738b680e5fd22aa84e3c6d14413515bc57d2 /python/tests/api_files.py | |
| parent | d56a544ec64df7ce6257982bd7a02b45b2cd1af5 (diff) | |
| download | fatcat-7815c6739e4ae730c7fe4589e8aa15b2b0f1033d.tar.gz fatcat-7815c6739e4ae730c7fe4589e8aa15b2b0f1033d.zip | |
add release expand api tests
Diffstat (limited to 'python/tests/api_files.py')
| -rw-r--r-- | python/tests/api_files.py | 16 | 
1 files changed, 7 insertions, 9 deletions
| diff --git a/python/tests/api_files.py b/python/tests/api_files.py index 5675071e..32d4a6ee 100644 --- a/python/tests/api_files.py +++ b/python/tests/api_files.py @@ -60,16 +60,14 @@ def test_file(api):  def test_file_examples(api): -    api.lookup_file(sha256='ffc1005680cb620eec4c913437dfabbf311b535cfe16cbaeb2faec1f92afc362') +    f1 = api.lookup_file(sha256='ffc1005680cb620eec4c913437dfabbf311b535cfe16cbaeb2faec1f92afc362') +    assert f1.releases is None -    f1 = api.get_file('aaaaaaaaaaaaamztaaaaaaaaam') +    f1 = api.get_file('aaaaaaaaaaaaamztaaaaaaaaam', expand="releases")      assert f1.sha256 == "ffc1005680cb620eec4c913437dfabbf311b535cfe16cbaeb2faec1f92afc362" - -    # TODO: no "get_file_releases" or expand thing yet... -    #f1r = api.get_file_releases("aaaaaaaaaaaaamztaaaaaaaaam") -    #assert f1r +    assert f1.releases[0].ident      # expansion (back from release) -    #r1 = api.get_release(f1r[0].ident, expand="files") -    #assert r1.files -    #assert f1.ident in [f.ident for f in r1.files] +    r1 = api.get_release(f1.releases[0].ident, expand="files") +    assert r1.files +    assert f1.ident in [f.ident for f in r1.files] | 
