Ejemplo n.º 1
0
    def test_save_data(self):
        pelican = self.create_pelican()
        token = 'AZERTY1234'
        data = {'title': 'my title', 'category': 'News', 'tags': 'Python'}

        s = ServicePelican()
        r = s.save_data(token, pelican.trigger_id, **data)
        self.assertTrue(r, True)

        pelican.path = '/tmp/foo'
        pelican.save()
        s = ServicePelican()
        r = s.save_data(token, pelican.trigger_id, **data)
        self.assertFalse(r, False)
Ejemplo n.º 2
0
    def test_save_data(self):
        pelican = self.create_pelican()
        token = 'AZERTY1234'
        data = {'title': 'my title', 'category': 'News', 'tags': 'Python'}

        s = ServicePelican()
        r = s.save_data(token, pelican.trigger_id, **data)
        self.assertTrue(r, True)

        pelican.path = '/tmp/foo'
        pelican.save()
        s = ServicePelican()
        r = s.save_data(token, pelican.trigger_id, **data)
        self.assertFalse(r, False)
Ejemplo n.º 3
0
    def test_save_data(self):
        pelican = self.create_pelican()
        data = {'title': 'my title', 'category': 'News',
                'tags': 'web',
                'my_date': '2016-08-20 13:23:58+00:00'}

        s = ServicePelican()
        r = s.save_data(pelican.trigger_id, **data)
        self.assertTrue(r, True)

        pelican.path = '/tmp/foo'
        pelican.save()
        s = ServicePelican()
        r = s.save_data(pelican.trigger_id, **data)
        self.assertFalse(r, False)
Ejemplo n.º 4
0
    def test_save_data(self):
        pelican = self.create_pelican()
        data = {'title': 'my title', 'category': 'News',
                'tags': 'web',
                'my_date': '2016-08-20 13:23:58+00:00'}

        s = ServicePelican()
        r = s.save_data(pelican.trigger_id, **data)
        self.assertTrue(r, True)

        pelican.path = '/tmp/foo'
        pelican.save()
        s = ServicePelican()
        r = s.save_data(pelican.trigger_id, **data)
        self.assertFalse(r, False)