Commit d7ef331e authored by Vincent A's avatar Vincent A

[primonialreim] add missing get_document and Document.format

parent 1a1773ea
Pipeline #3732 passed with stages
in 64 minutes and 49 seconds
......@@ -67,6 +67,9 @@ def get_subscription(self, id):
def iter_documents(self, subscription):
return self.browser.iter_documents()
def get_document(self, id):
return find_object(self.iter_documents(None), id=id, error=DocumentNotFound)
def download_document(self, document):
if isinstance(document, str):
document = find_object(self.iter_documents(None), id=document, error=DocumentNotFound)
......
......@@ -74,6 +74,8 @@ class item(ItemElement):
klass = Document
obj_type = DocumentTypes.NOTICE
obj_format = "pdf"
obj_url = AbsoluteLink(".")
obj_id = Regexp(obj_url, r"/([^/]+)\.pdf")
......
......@@ -17,8 +17,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
# flake8: compatible
from __future__ import unicode_literals
from weboob.tools.test import BackendTest
......
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