From 93297fa1488f03afedd5801ce30540b427cb2d96 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 20 Feb 2021 19:19:16 +0100 Subject: [PATCH] poleemploi: rename from popolemploi --- modules/{popolemploi => poleemploi}/__init__.py | 4 ++-- modules/{popolemploi => poleemploi}/browser.py | 7 ++++--- modules/{popolemploi => poleemploi}/favicon.png | Bin modules/{popolemploi => poleemploi}/module.py | 11 ++++++----- modules/{popolemploi => poleemploi}/pages.py | 0 modules/{popolemploi => poleemploi}/test.py | 9 ++++----- 6 files changed, 16 insertions(+), 15 deletions(-) rename modules/{popolemploi => poleemploi}/__init__.py (91%) rename modules/{popolemploi => poleemploi}/browser.py (96%) rename modules/{popolemploi => poleemploi}/favicon.png (100%) rename modules/{popolemploi => poleemploi}/module.py (98%) rename modules/{popolemploi => poleemploi}/pages.py (100%) rename modules/{popolemploi => poleemploi}/test.py (92%) diff --git a/modules/popolemploi/__init__.py b/modules/poleemploi/__init__.py similarity index 91% rename from modules/popolemploi/__init__.py rename to modules/poleemploi/__init__.py index 85b6a0fadb..a6e4982d09 100644 --- a/modules/popolemploi/__init__.py +++ b/modules/poleemploi/__init__.py @@ -18,7 +18,7 @@ # along with this weboob module. If not, see . -from .module import PopolemploiModule +from .module import PoleEmploiModule -__all__ = ['PopolemploiModule'] +__all__ = ['PoleEmploiModule'] diff --git a/modules/popolemploi/browser.py b/modules/poleemploi/browser.py similarity index 96% rename from modules/popolemploi/browser.py rename to modules/poleemploi/browser.py index 407c4eff35..6556522ab1 100644 --- a/modules/popolemploi/browser.py +++ b/modules/poleemploi/browser.py @@ -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 . -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.*)', AdvertPage) diff --git a/modules/popolemploi/favicon.png b/modules/poleemploi/favicon.png similarity index 100% rename from modules/popolemploi/favicon.png rename to modules/poleemploi/favicon.png diff --git a/modules/popolemploi/module.py b/modules/poleemploi/module.py similarity index 98% rename from modules/popolemploi/module.py rename to modules/poleemploi/module.py index 667e2f69fb..5796142457 100644 --- a/modules/popolemploi/module.py +++ b/modules/poleemploi/module.py @@ -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', diff --git a/modules/popolemploi/pages.py b/modules/poleemploi/pages.py similarity index 100% rename from modules/popolemploi/pages.py rename to modules/poleemploi/pages.py diff --git a/modules/popolemploi/test.py b/modules/poleemploi/test.py similarity index 92% rename from modules/popolemploi/test.py rename to modules/poleemploi/test.py index 3398c0d29b..f068361776 100644 --- a/modules/popolemploi/test.py +++ b/modules/poleemploi/test.py @@ -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 . - 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]) -- GitLab