Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | # coding: utf-8 |
||
6 | class TriggerSettingsTestCase(unittest.TestCase): |
||
7 | |||
8 | """ |
||
9 | check that all the needed config is present |
||
10 | """ |
||
11 | |||
12 | def test_get_config_service(self): |
||
13 | self.assertTrue(settings.TH_SERVICES) |
||
14 | |||
15 | def test_get_config_th(self): |
||
16 | self.assertTrue(settings.DJANGO_TH) |
||
17 | self.assertIn('paginate_by', settings.DJANGO_TH) |
||
18 | self.assertIn('publishing_limit', settings.DJANGO_TH) |
||
19 | self.assertIs(type(settings.DJANGO_TH['paginate_by']), int) |
||
20 | self.assertIs(type(settings.DJANGO_TH['publishing_limit']), int) |
||
21 | self.assertIs(type(settings.DJANGO_TH['processes']), int) |
||
22 | |||
23 | def test_get_services_list(self): |
||
24 | th_service = ( |
||
25 | 'th_rss.my_rss.ServiceRss', |
||
26 | # 'th_pocket.my_pocket.ServicePocket', |
||
27 | # 'th_evernote.my_evernote.ServiceEvernote', |
||
28 | # 'th_readability.my_readability.ServiceReadability', |
||
29 | # 'th_twitter.my_twitter.ServiceTwitter', |
||
30 | # 'th_trello.my_trello.ServiceTrello', |
||
31 | ) |
||
32 | for service in th_service: |
||
33 | self.assertIn(service, settings.TH_SERVICES) |
||
34 |