Exemple #1
0
 def test_read_data(self):
     """
        Test if the creation of the Instapush object looks fine
     """
     kwargs = {}
     se = ServiceInstapush()
     se.read_data(**kwargs)
Exemple #2
0
 def test_read_data(self):
     """
        Test if the creation of the Instapush object looks fine
     """
     kwargs = {}
     se = ServiceInstapush()
     res = se.read_data(**kwargs)
     self.assertTrue(type(res) is dict)
Exemple #3
0
    def test_save_data(self, mock1):
        """
           Test if the creation of the Instapush object looks fine
        """
        self.create_instapush()
        data = {'title': 'foo', 'content': 'bar'}
        se = ServiceInstapush(self.token)
        the_return = se.save_data(self.trigger_id, **data)
        mock1.assert_called_once_with(event_name='signups',
                                      trackers={'email': data['content']})

        self.assertTrue(the_return)
Exemple #4
0
 def setUp(self):
     """
        create a user
     """
     super(InstapushTest, self).setUp()
     self.data = {'link': 'http://foo.bar/some/thing/else/what/else',
                  'title': 'what else',
                  'content': 'foobar',
                  'summary_detail': 'summary foobar',
                  'description': 'description foobar'}
     self.token = 'AZERTY123'
     self.trigger_id = 1
     self.service = ServiceInstapush(self.token)