|
1 | 1 | import pathlib |
2 | 2 | import re |
3 | | -import typing |
4 | 3 | import unittest.mock |
5 | 4 |
|
6 | | -from bugwarrior import config, services |
| 5 | +from bugwarrior import services |
7 | 6 | from bugwarrior.config import schema |
8 | 7 |
|
9 | | -from .base import ConfigTest |
| 8 | +from .base import ConfigTest, DumbService |
10 | 9 |
|
11 | 10 | LONG_MESSAGE = """\ |
12 | 11 | Some message that is over 100 characters. This message is so long it's |
13 | 12 | going to fill up your floppy disk taskwarrior backup. Actually it's not |
14 | 13 | that long.""".replace('\n', ' ') |
15 | 14 |
|
16 | 15 |
|
17 | | -class DumbConfig(config.ServiceConfig): |
18 | | - service: typing.Literal['test'] |
19 | | - |
20 | | - import_labels_as_tags: bool = False |
21 | | - label_template: str = '{{label}}' |
22 | | - |
23 | | - |
24 | | -class DumbIssue(services.Issue): |
25 | | - """ |
26 | | - Implement the required methods but they shouldn't be called. |
27 | | - """ |
28 | | - |
29 | | - def get_default_description(self): |
30 | | - raise NotImplementedError |
31 | | - |
32 | | - def to_taskwarrior(self): |
33 | | - raise NotImplementedError |
34 | | - |
35 | | - |
36 | | -class DumbService(services.Service): |
37 | | - """ |
38 | | - Implement the required methods but they shouldn't be called. |
39 | | - """ |
40 | | - |
41 | | - API_VERSION = 1.0 |
42 | | - ISSUE_CLASS = DumbIssue |
43 | | - CONFIG_SCHEMA = DumbConfig |
44 | | - |
45 | | - @staticmethod |
46 | | - def get_keyring_service(_): |
47 | | - raise NotImplementedError |
48 | | - |
49 | | - def get_owner(self, _): |
50 | | - raise NotImplementedError |
51 | | - |
52 | | - def issues(self): |
53 | | - raise NotImplementedError |
54 | | - |
55 | | - |
56 | 16 | class ServiceBase(ConfigTest): |
57 | 17 | def setUp(self): |
58 | 18 | super().setUp() |
|
0 commit comments