Exemple #1
0
def test_github_serialize(ref):
    github = storage.GitHub(repo="test/repo", path="flow.py")
    if ref is not None:
        github.ref = ref
    serialized = GitHubSchema().dump(github)
    assert serialized["__version__"] == prefect.__version__
    assert serialized["repo"] == "test/repo"
    assert serialized["path"] == "flow.py"
    assert serialized["ref"] == ref
    assert serialized["secrets"] == []
Exemple #2
0
def test_github_serialize(ref, access_token_secret, base_url):
    github = storage.GitHub(
        repo="test/repo",
        path="flow.py",
        access_token_secret=access_token_secret,
        base_url=base_url,
    )
    if ref is not None:
        github.ref = ref
    serialized = GitHubSchema().dump(github)
    assert serialized["__version__"] == prefect.__version__
    assert serialized["repo"] == "test/repo"
    assert serialized["path"] == "flow.py"
    assert serialized["ref"] == ref
    assert serialized["secrets"] == []
    assert serialized["access_token_secret"] == access_token_secret
    assert serialized["base_url"] == base_url
def test_github_serialize(ref):
    github = storage.GitHub(repo="test/repo", path="flow.py")
    if ref is not None: