-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f76adc6
commit a09c240
Showing
3 changed files
with
41 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from __future__ import annotations | ||
|
||
import datetime | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture() | ||
def repo_list_config(request): | ||
"""Get a default list of repos or pass your own by decorating your test with | ||
@pytest.mark.repo_list(['org1/repo1', 'org2/repo2']) | ||
""" | ||
marker = request.node.get_closest_marker("repo_list") | ||
if marker is None: | ||
repo_list = ["MeltanoLabs/tap-github", "mapswipe/mapswipe"] | ||
else: | ||
repo_list = marker.args[0] | ||
|
||
return { | ||
"metrics_log_level": "warning", | ||
"start_date": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"), | ||
"repositories": repo_list, | ||
"rate_limit_buffer": 100, | ||
} | ||
|
||
|
||
@pytest.fixture() | ||
def username_list_config(request): | ||
"""Get a default list of usernames or pass your own by decorating your test with | ||
@pytest.mark.username_list(['ericboucher', 'aaronsteers']) | ||
""" | ||
marker = request.node.get_closest_marker("username_list") | ||
username_list = ["ericboucher", "aaronsteers"] if marker is None else marker.args[0] | ||
|
||
return { | ||
"metrics_log_level": "warning", | ||
"start_date": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d"), | ||
"user_usernames": username_list, | ||
"rate_limit_buffer": 100, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters