Commit 93297fa1 authored by Romain Bignon's avatar Romain Bignon

poleemploi: rename from popolemploi

parent 7da74652
Pipeline #3589 passed with stages
in 12 minutes and 26 seconds
......@@ -18,7 +18,7 @@
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from .module import PopolemploiModule
from .module import PoleEmploiModule
__all__ = ['PopolemploiModule']
__all__ = ['PoleEmploiModule']
......@@ -17,15 +17,16 @@
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from .pages import SearchPage, AdvertPage
from weboob.browser import PagesBrowser, URL
from weboob.tools.compat import urlencode
__all__ = ['PopolemploiBrowser']
from .pages import SearchPage, AdvertPage
__all__ = ['PoleEmploiBrowser']
class PopolemploiBrowser(PagesBrowser):
class PoleEmploiBrowser(PagesBrowser):
BASEURL = 'https://candidat.pole-emploi.fr'
advert = URL('/offres/recherche/detail/(?P<id>.*)', AdvertPage)
......
......@@ -25,19 +25,20 @@
from weboob.capabilities.job import CapJob
from weboob.tools.value import Value, ValueInt
from .browser import PopolemploiBrowser
from .browser import PoleEmploiBrowser
__all__ = ['PopolemploiModule']
__all__ = ['PoleEmploiModule']
class PopolemploiModule(Module, CapJob):
NAME = 'popolemploi'
class PoleEmploiModule(Module, CapJob):
NAME = 'poleemploi'
DESCRIPTION = u'Pole Emploi website'
MAINTAINER = u'Bezleputh'
EMAIL = 'carton_ben@yahoo.fr'
VERSION = '2.1'
BROWSER = PopolemploiBrowser
BROWSER = PoleEmploiBrowser
places_choices = OrderedDict([(k, u'%s' % (v)) for k, v in sorted({
'100|PAYS|01': u'France entière',
......
......@@ -17,13 +17,12 @@
# You should have received a copy of the GNU Affero General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.test import BackendTest
from weboob.tools.value import Value
class PopolemploiTest(BackendTest):
MODULE = 'popolemploi'
class PoleEmploiTest(BackendTest):
MODULE = 'poleemploi'
def setUp(self):
if not self.is_backend_configured():
......@@ -34,13 +33,13 @@ def setUp(self):
self.backend.config['domain'] = Value(value='M18')
self.backend.config['limit_data'] = Value(value='93')
def test_popolemploi_search(self):
def test_poleemploi_search(self):
l = list(self.backend.search_job('infographiste'))
assert len(l)
advert = self.backend.get_job_advert(l[0].id, l[0])
self.assertTrue(advert.url, 'URL for announce "%s" not found: %s' % (advert.id, advert.url))
def test_popolemploi_advanced_search(self):
def test_poleemploi_advanced_search(self):
l = list(self.backend.advanced_search_job())
assert len(l)
advert = self.backend.get_job_advert(l[0].id, l[0])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment