Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier Per-Service Configuration Testing #955

Open
ryneeverett opened this issue Sep 1, 2022 · 0 comments
Open

Easier Per-Service Configuration Testing #955

ryneeverett opened this issue Sep 1, 2022 · 0 comments

Comments

@ryneeverett
Copy link
Collaborator

Per #954 (comment), we could make it simpler and more straightforward to test different service configuration values if we replaced our per-service self.config definition with some magic in the base class that allowed for better ergonomics, e.g.:

def test_filter_repos_include(self):
    self.service.config['deck.include_board_ids'] = ['5']
    self.assertTrue(self.service.filter_repos({'title': 'testboard', 'id': 5}))
    self.assertFalse(self.service.filter_repos({'title': 'testboard', 'id': 6}))

def test_filter_repos_exclude(self):
    self.service.config['deck.exclude_board_ids'] = ['5']
    self.assertFalse(self.service.filter_repos({'title': 'testboard', 'id': 5}))
    self.assertTrue(self.service.filter_repos({'title': 'testboard', 'id': 6}))

It may or may not make sense to put config in the top level namespace instead of within service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant