many-repos/tests/conftest.py
2024-05-28 15:35:47 +02:00

67 lines
1.5 KiB
Python

import pytest
from many_repos.common import Repository
from many_repos.config import Source, Config
@pytest.fixture(params=[True, False])
def source_config(request):
return Source(
source_type="github",
username="JustScreaMy",
token="testToken",
forks=request.param
)
@pytest.fixture
def test_repo():
return Repository(
name="many-repos",
namespace="JustScreaMy",
url="git@github.com/JustScreaMy/many-repos.git",
fork=False,
vcs="github.com"
)
@pytest.fixture
def many_repos_config():
return Config(
output_dir="/tmp/test/repos",
sources_configs={
"gitlab": Source(
source_type="gitlab",
username="JustScreaMy",
token="testToken",
forks=False
),
"github": Source(
source_type="github",
username="JustScreaMy",
token="testTokasden",
forks=False
)
}
)
@pytest.fixture
def invalid_many_repos_config():
return Config(
output_dir="/tmp/test/repos",
sources_configs={
"gitlab": Source(
source_type="gitlab",
username="JustScreaMy",
token="testToken",
forks=False
),
"bitbucket": Source(
source_type="bitbucket",
username="JustScreaMy",
token="testTokasden",
forks=False
)
}
)