How to use the aiogithubapi.objects.repository.release.AIOGitHubAPIRepositoryRelease function in aiogithubapi

To help you get started, we’ve selected a few aiogithubapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hacs / integration / tests / helpers / information / test_find_file_name.py View on Github external
def test_find_file_release():
    repository = dummy_repository_plugin()
    repository.releases.objects = [
        AIOGitHubAPIRepositoryRelease(
            {"tag_name": "3", "assets": [{"name": "test.js"}]}
        )
    ]
    find_file_name(repository)
    assert repository.data.file_name == "test.js"
    assert repository.content.path.remote == "release"
github hacs / integration / tests / helpers / download / test_gather_files_to_download.py View on Github external
def test_gather_zip_release():
    repository = dummy_repository_plugin()
    repository.data.file_name = "test.zip"
    repository.data.zip_release = True
    repository.data.filename = "test.zip"
    repository.releases.objects = [
        AIOGitHubAPIRepositoryRelease(
            {"tag_name": "3", "assets": [{"name": "test.zip"}]}
        )
    ]
    files = [x.name for x in gather_files_to_download(repository)]
    assert "test.zip" in files
github hacs / integration / tests / helpers / download / test_gather_files_to_download.py View on Github external
def test_gather_plugin_files_from_release():
    repository = dummy_repository_plugin()
    repository.data.file_name = "test.js"
    repository.data.releases = True
    release = AIOGitHubAPIRepositoryRelease(
        {"tag_name": "3", "assets": [{"name": "test.js"}]}
    )
    repository.releases.objects = [release]
    files = [x.name for x in gather_files_to_download(repository)]
    assert "test.js" in files
github hacs / integration / tests / helpers / information / test_find_file_name.py View on Github external
def test_find_file_release_no_asset():
    repository = dummy_repository_plugin()
    repository.releases.objects = [
        AIOGitHubAPIRepositoryRelease({"tag_name": "3", "assets": []})
    ]
    repository.tree = [
        AIOGitHubAPIRepositoryTreeContent(
            {"path": "test.js", "type": "blob"}, "test/test", "master"
        )
    ]
    find_file_name(repository)
    assert repository.data.file_name == "test.js"
    assert repository.content.path.remote == ""
github hacs / integration / tests / helpers / download / test_gather_files_to_download.py View on Github external
def test_gather_plugin_files_from_release_multiple():
    repository = dummy_repository_plugin()
    repository.data.file_name = "test.js"
    repository.data.releases = True
    repository.releases.objects = [
        AIOGitHubAPIRepositoryRelease(
            {"tag_name": "3", "assets": [{"name": "test.js"}, {"name": "test.png"}]}
        )
    ]
    files = [x.name for x in gather_files_to_download(repository)]
    assert "test.js" in files
    assert "test.png" in files