-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from fcollonval/ft/improve-tests
Improve config handling
- Loading branch information
Showing
9 changed files
with
163 additions
and
150 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,40 @@ | ||
import pytest | ||
|
||
from ..base import PRConfig | ||
|
||
# the preferred method for loading jupyter_server (because entry_points) | ||
pytest_plugins = ["jupyter_server.pytest_plugin"] | ||
|
||
|
||
@pytest.fixture | ||
def pr_base_config(): | ||
return PRConfig() | ||
|
||
|
||
@pytest.fixture | ||
def pr_github_config(pr_base_config): | ||
return pr_base_config() | ||
|
||
|
||
@pytest.fixture | ||
def pr_github_manager(pr_base_config): | ||
from ..managers.github import GitHubManager | ||
return GitHubManager(pr_base_config) | ||
|
||
|
||
@pytest.fixture | ||
def pr_valid_github_manager(pr_github_manager): | ||
pr_github_manager._config.access_token = "valid" | ||
return pr_github_manager | ||
|
||
|
||
@pytest.fixture | ||
def pr_gitlab_manger(pr_base_config): | ||
from ..managers.gitlab import GitLabManager | ||
return GitLabManager(pr_base_config) | ||
|
||
|
||
@pytest.fixture | ||
def pr_valid_gitlab_manager(pr_gitlab_manger): | ||
pr_gitlab_manger._config.access_token = "valid" | ||
return pr_gitlab_manger |
Oops, something went wrong.