Skip to content

Easier Per-Service Configuration Testing #955

Description

@ryneeverett

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenancedoesn't necessarily have an immediate impact on users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions