Completed
Branch master (28ef54)
by Fox
01:25
created

TriggerSettingsTestCase   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 28
rs 10
wmc 4
1
# coding: utf-8
2
import unittest
3
from django.conf import settings
4
5
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