def test_get_data2(self):
        cache_stack = "th_rss"
        cache_data = {"th_rss_1": "foobar"}
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data, trigger_id)
        self.assertTrue(len(services) > 0)
Exemple #2
0
 def process_data(self, trigger_id):
     """
         get the data from the cache
         :param trigger_id: trigger ID from which to save data
         :type trigger_id: int
     """
     cache_data = cache.get('th_evernote_' + str(trigger_id))
     return PublishingLimit.get_data('th_evernote', cache_data, trigger_id)
Exemple #3
0
 def process_data(self, trigger_id):
     """
         get the data from the cache
         :param trigger_id: trigger ID from which to save data
         :type trigger_id: int
     """
     cache_data = cache.get('th_trello_' + str(trigger_id))
     return PublishingLimit.get_data('th_trello_', cache_data, trigger_id)
    def test_get_data2(self):
        cache_stack = "th_rss"
        cache_data = {'th_rss_1': 'foobar'}
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data,
                                            trigger_id)
        self.assertTrue(len(services) > 0)
    def test_get_data(self):

        cache_stack = "th_rss"
        cache_data = {}
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data, trigger_id)
        self.assertTrue(len(services) == 0)
Exemple #6
0
 def process_data(self, **kwargs):
     """
          get the data from the cache
         :param kwargs: contain keyword args : trigger_id at least
         :type kwargs: dict
     """
     cache = caches[kwargs['cache_stack']]
     cache_data = cache.get(kwargs['cache_stack'] + '_' + kwargs['trigger_id'])
     return PublishingLimit.get_data(kwargs['cache_stack'], cache_data, kwargs['trigger_id'])
    def test_get_data(self):

        cache_stack = "th_rss"
        cache_data = {}
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data,
                                            trigger_id)
        self.assertTrue(len(services) == 0)
Exemple #8
0
 def process_data(self, **kwargs):
     """
          get the data from the cache
         :param kwargs: contain keyword args : trigger_id at least
         :type kwargs: dict
     """
     cache = caches['django_th']
     cache_data = cache.get(kwargs.get('cache_stack') + '_' + kwargs.get('trigger_id'))
     return PublishingLimit.get_data(kwargs.get('cache_stack'), cache_data, int(kwargs.get('trigger_id')))
Exemple #9
0
 def process_data(self, **kwargs):
     """
          get the data from the cache
         :param kwargs: contain keyword args : trigger_id at least
         :type kwargs: dict
     """
     cache = caches[kwargs['cache_stack']]
     cache_data = cache.get(kwargs['cache_stack'] + '_' +
                            kwargs['trigger_id'])
     return PublishingLimit.get_data(kwargs['cache_stack'], cache_data,
                                     kwargs['trigger_id'])
    def test_get_data3(self):
        cache_stack = "th_rss"
        cache_data = []
        cache_data.append({"th_rss_1": "foobar"})
        cache_data.append({"th_rss_2": "foobar"})
        cache_data.append({"th_rss_3": "foobar"})
        cache_data.append({"th_rss_4": "foobar"})
        cache_data.append({"th_rss_5": "foobar"})
        cache_data.append({"th_rss_6": "foobar"})
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data, trigger_id)
        self.assertTrue(len(services) > 0)
    def test_get_data3(self):
        cache_stack = "th_rss"
        cache_data = []
        cache_data.append({'th_rss_1': 'foobar'})
        cache_data.append({'th_rss_2': 'foobar'})
        cache_data.append({'th_rss_3': 'foobar'})
        cache_data.append({'th_rss_4': 'foobar'})
        cache_data.append({'th_rss_5': 'foobar'})
        cache_data.append({'th_rss_6': 'foobar'})
        trigger_id = 1

        services = PublishingLimit.get_data(cache_stack, cache_data,
                                            trigger_id)
        self.assertTrue(len(services) > 0)