Skip to content
test.py 1.22 KiB
Newer Older
Famil Os's avatar
Famil Os committed
# -*- coding: utf-8 -*-
Florent's avatar
Florent committed

# Copyright(C) 2014 Vicnet
#
Roger Philibert's avatar
Roger Philibert committed
# This file is part of a woob module.
Florent's avatar
Florent committed
#
Roger Philibert's avatar
Roger Philibert committed
# This woob module is free software: you can redistribute it and/or modify
Florent's avatar
Florent committed
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
Roger Philibert's avatar
Roger Philibert committed
# This woob module is distributed in the hope that it will be useful,
Florent's avatar
Florent committed
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
Roger Philibert's avatar
Roger Philibert committed
# along with this woob module. If not, see <http://www.gnu.org/licenses/>.
Florent's avatar
Florent committed


from woob.tools.test import BackendTest
Bezleputh's avatar
Bezleputh committed
import itertools
Famil Os's avatar
Famil Os committed

Florent's avatar
Florent committed

Famil Os's avatar
Famil Os committed
class LaCentraleTest(BackendTest):
Florent's avatar
Florent committed
    MODULE = 'lacentrale'
Famil Os's avatar
Famil Os committed

    def test_lacentrale(self):
        products = list(itertools.islice(self.backend.search_products(u'10000€,pro'), 0, 20))
Famil Os's avatar
Famil Os committed
        self.assertTrue(len(products) > 0)
        product = products[0]
        product.backend = self.backend.name
        prices = list(itertools.islice(self.backend.iter_prices([product]), 0, 20))
Famil Os's avatar
Famil Os committed
        self.assertTrue(len(prices) > 0)