# Path: articlemeta/export_pubmed.py
# SUPPLBEG_REGEX = re.compile(r'^0 ')
# SUPPLEND_REGEX = re.compile(r' 0$')
# class SetupArticleSetPipe(plumber.Pipe):
# class XMLArticlePipe(plumber.Pipe):
# class XMLJournalPipe(plumber.Pipe):
# class XMLPublisherNamePipe(plumber.Pipe):
# class XMLJournalTitlePipe(plumber.Pipe):
# class XMLISSNPipe(plumber.Pipe):
# class XMLVolumePipe(plumber.Pipe):
# class XMLIssuePipe(plumber.Pipe):
# class XMLPubDatePipe(plumber.Pipe):
# class XMLReplacesPipe(plumber.Pipe):
# class XMLArticleTitlePipe(plumber.Pipe):
# class XMLFirstPagePipe(plumber.Pipe):
# class XMLLastPagePipe(plumber.Pipe):
# class XMLElocationIDPipe(plumber.Pipe):
# class XMLLanguagePipe(plumber.Pipe):
# class XMLAuthorListPipe(plumber.Pipe):
# class XMLPublicationTypePipe(plumber.Pipe):
# class XMLArticleIDListPipe(plumber.Pipe):
# class XMLHistoryPipe(plumber.Pipe):
# class XMLAbstractPipe(plumber.Pipe):
# class XMLClosePipe(plumber.Pipe):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
# 
# Path: articlemeta/export.py
# class CustomArticle(Article):
# class JournalExport:
# class Export(object):
#     def issue_publication_date(self):
#     def __init__(self, journal):
#     def pipeline_scieloorg(self):
#         def _safegetter(func):
#     def __init__(self, article):
#     def pipeline_sci(self):
#     def pipeline_rsps(self):
#     def pipeline_doaj(self):
#     def pipeline_pubmed(self):
#     def pipeline_crossref(self):
#     def pipeline_opac(self):


import unittest
import json
import os
from lxml import etree as ET
from xylose.scielodocument import Article
from articlemeta import export_pubmed
from articlemeta import export
        data = [self._article_meta, pxml]

        xmlarticle = export_pubmed.XMLArticleTitlePipe()
        raw, xml = xmlarticle.transform(data)

        articletitle = xml.find('./Article/ArticleTitle').text

        self.assertEqual(u'Perfil epidemiológico dos pacientes em terapia renal substitutiva no Brasil, 2000-2004', articletitle)

    def test_xmlfirstpage_pipe(self):

        pxml = ET.Element('ArticleSet')
        pxml.append(ET.Element('Article'))

        data = [self._article_meta, pxml]

        xmlarticle = export_pubmed.XMLFirstPagePipe()
        raw, xml = xmlarticle.transform(data)

        firstpage = xml.find('./Article/FirstPage').text

        self.assertEqual(u'639', firstpage)

    def test_xmllastpage_pipe(self):

        pxml = ET.Element('ArticleSet')
        pxml.append(ET.Element('Article'))

        data = [self._article_meta, pxml]


# Path: articlemeta/export_pubmed.py
# SUPPLBEG_REGEX = re.compile(r'^0 ')
# SUPPLEND_REGEX = re.compile(r' 0$')
# class SetupArticleSetPipe(plumber.Pipe):
# class XMLArticlePipe(plumber.Pipe):
# class XMLJournalPipe(plumber.Pipe):
# class XMLPublisherNamePipe(plumber.Pipe):
# class XMLJournalTitlePipe(plumber.Pipe):
# class XMLISSNPipe(plumber.Pipe):
# class XMLVolumePipe(plumber.Pipe):
# class XMLIssuePipe(plumber.Pipe):
# class XMLPubDatePipe(plumber.Pipe):
# class XMLReplacesPipe(plumber.Pipe):
# class XMLArticleTitlePipe(plumber.Pipe):
# class XMLFirstPagePipe(plumber.Pipe):
# class XMLLastPagePipe(plumber.Pipe):
# class XMLElocationIDPipe(plumber.Pipe):
# class XMLLanguagePipe(plumber.Pipe):
# class XMLAuthorListPipe(plumber.Pipe):
# class XMLPublicationTypePipe(plumber.Pipe):
# class XMLArticleIDListPipe(plumber.Pipe):
# class XMLHistoryPipe(plumber.Pipe):
# class XMLAbstractPipe(plumber.Pipe):
# class XMLClosePipe(plumber.Pipe):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
#     def transform(self, data):
# 
# Path: articlemeta/export.py
# class CustomArticle(Article):
# class JournalExport:
# class Export(object):
#     def issue_publication_date(self):
#     def __init__(self, journal):
#     def pipeline_scieloorg(self):
#         def _safegetter(func):
#     def __init__(self, article):
#     def pipeline_sci(self):
#     def pipeline_rsps(self):
#     def pipeline_doaj(self):
#     def pipeline_pubmed(self):
#     def pipeline_crossref(self):
#     def pipeline_opac(self):


# Path: tests/test_export_pubmed.py
import unittest
import json
import os
from lxml import etree as ET
from xylose.scielodocument import Article
from articlemeta import export_pubmed
from articlemeta import export

        data = [self._article_meta, pxml]

        xmlarticle = export_pubmed.XMLArticleTitlePipe()
        raw, xml = xmlarticle.transform(data)

        articletitle = xml.find('./Article/ArticleTitle').text

        self.assertEqual(u'Perfil epidemiológico dos pacientes em terapia renal substitutiva no Brasil, 2000-2004', articletitle)

    def test_xmlfirstpage_pipe(self):

        pxml = ET.Element('ArticleSet')
        pxml.append(ET.Element('Article'))

        data = [self._article_meta, pxml]

        xmlarticle = export_pubmed.XMLFirstPagePipe()
        raw, xml = xmlarticle.transform(data)

        firstpage = xml.find('./Article/FirstPage').text

        self.assertEqual(u'639', firstpage)

    def test_xmllastpage_pipe(self):

        pxml = ET.Element('ArticleSet')
        pxml.append(ET.Element('Article'))

        data = [self._article_meta, pxml]


        xmlarticle = export_pubmed.XMLLastPagePipe()