# Path: articlemeta/export_doaj.py
# SUPPLBEG_REGEX = re.compile(r'^0 ')
# SUPPLEND_REGEX = re.compile(r' 0$')
# ISO6392T_TO_ISO6392B = {
#     u'sqi': u'alb',
#     u'hye': u'arm',
#     u'eus': u'baq',
#     u'mya': u'bur',
#     u'zho': u'chi',
#     u'ces': u'cze',
#     u'nld': u'dut',
#     u'fra': u'fre',
#     u'kat': u'geo',
#     u'deu': u'ger',
#     u'ell': u'gre',
#     u'isl': u'ice',
#     u'mkd': u'mac',
#     u'msa': u'may',
#     u'mri': u'mao',
#     u'fas': u'per',
#     u'ron': u'rum',
#     u'slk': u'slo',
#     u'bod': u'tib',
#     u'cym': u'wel'
# }
# class SetupArticlePipe(plumber.Pipe):
# class XMLArticlePipe(plumber.Pipe):
# class XMLJournalMetaJournalTitlePipe(plumber.Pipe):
# class XMLJournalMetaISSNPipe(plumber.Pipe):
# class XMLJournalMetaPublisherPipe(plumber.Pipe):
# class XMLArticleMetaIdPipe(plumber.Pipe):
# class XMLArticleMetaArticleIdDOIPipe(plumber.Pipe):
# class XMLArticleMetaTitlePipe(plumber.Pipe):
# class XMLArticleMetaAuthorsPipe(plumber.Pipe):
# class XMLArticleMetaAffiliationPipe(plumber.Pipe):
# class XMLArticleMetaPublicationDatePipe(plumber.Pipe):
# class XMLArticleMetaStartPagePipe(plumber.Pipe):
# class XMLArticleMetaEndPagePipe(plumber.Pipe):
# class XMLArticleMetaVolumePipe(plumber.Pipe):
# class XMLArticleMetaIssuePipe(plumber.Pipe):
# class XMLArticleMetaDocumentTypePipe(plumber.Pipe):
# class XMLArticleMetaFullTextUrlPipe(plumber.Pipe):
# class XMLArticleMetaAbstractsPipe(plumber.Pipe):
# class XMLArticleMetaKeywordsPipe(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 precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(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 lxml import etree
from xylose.scielodocument import Article
from articlemeta import export_doaj
from articlemeta import export
                          u'A01', u'A02', u'A01', u'A03'], fullnames)

    def test_xmlarticle_meta_contrib_group_without_data_pipe(self):

        fakexylosearticle = Article({'article': {}, 'title': {}})

        pxml = ET.Element('records')
        pxml.append(ET.Element('record'))

        data = [fakexylosearticle, pxml]

        xmlarticle = export_doaj.XMLArticleMetaAuthorsPipe()
        raw, xml = xmlarticle.transform(data)

        try:
            xml.find('./record/authors').text
        except AttributeError:
            self.assertTrue(True)
        else:
            self.assertTrue(False)

    def test_xmlarticle_meta_affiliation_without_data_pipe(self):

        fakexylosearticle = Article({'article': {}, 'title': {}})

        pxml = ET.Element('records')
        pxml.append(ET.Element('record'))

        data = [fakexylosearticle, pxml]


# Path: articlemeta/export_doaj.py
# SUPPLBEG_REGEX = re.compile(r'^0 ')
# SUPPLEND_REGEX = re.compile(r' 0$')
# ISO6392T_TO_ISO6392B = {
#     u'sqi': u'alb',
#     u'hye': u'arm',
#     u'eus': u'baq',
#     u'mya': u'bur',
#     u'zho': u'chi',
#     u'ces': u'cze',
#     u'nld': u'dut',
#     u'fra': u'fre',
#     u'kat': u'geo',
#     u'deu': u'ger',
#     u'ell': u'gre',
#     u'isl': u'ice',
#     u'mkd': u'mac',
#     u'msa': u'may',
#     u'mri': u'mao',
#     u'fas': u'per',
#     u'ron': u'rum',
#     u'slk': u'slo',
#     u'bod': u'tib',
#     u'cym': u'wel'
# }
# class SetupArticlePipe(plumber.Pipe):
# class XMLArticlePipe(plumber.Pipe):
# class XMLJournalMetaJournalTitlePipe(plumber.Pipe):
# class XMLJournalMetaISSNPipe(plumber.Pipe):
# class XMLJournalMetaPublisherPipe(plumber.Pipe):
# class XMLArticleMetaIdPipe(plumber.Pipe):
# class XMLArticleMetaArticleIdDOIPipe(plumber.Pipe):
# class XMLArticleMetaTitlePipe(plumber.Pipe):
# class XMLArticleMetaAuthorsPipe(plumber.Pipe):
# class XMLArticleMetaAffiliationPipe(plumber.Pipe):
# class XMLArticleMetaPublicationDatePipe(plumber.Pipe):
# class XMLArticleMetaStartPagePipe(plumber.Pipe):
# class XMLArticleMetaEndPagePipe(plumber.Pipe):
# class XMLArticleMetaVolumePipe(plumber.Pipe):
# class XMLArticleMetaIssuePipe(plumber.Pipe):
# class XMLArticleMetaDocumentTypePipe(plumber.Pipe):
# class XMLArticleMetaFullTextUrlPipe(plumber.Pipe):
# class XMLArticleMetaAbstractsPipe(plumber.Pipe):
# class XMLArticleMetaKeywordsPipe(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 precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(data):
#     def transform(self, data):
#     def precond(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_doaj.py
import unittest
import json
import os
from lxml import etree as ET
from lxml import etree
from xylose.scielodocument import Article
from articlemeta import export_doaj
from articlemeta import export

                          u'A01', u'A02', u'A01', u'A03'], fullnames)

    def test_xmlarticle_meta_contrib_group_without_data_pipe(self):

        fakexylosearticle = Article({'article': {}, 'title': {}})

        pxml = ET.Element('records')
        pxml.append(ET.Element('record'))

        data = [fakexylosearticle, pxml]

        xmlarticle = export_doaj.XMLArticleMetaAuthorsPipe()
        raw, xml = xmlarticle.transform(data)

        try:
            xml.find('./record/authors').text
        except AttributeError:
            self.assertTrue(True)
        else:
            self.assertTrue(False)

    def test_xmlarticle_meta_affiliation_without_data_pipe(self):

        fakexylosearticle = Article({'article': {}, 'title': {}})

        pxml = ET.Element('records')
        pxml.append(ET.Element('record'))

        data = [fakexylosearticle, pxml]


        xmlarticle = export_doaj.XMLArticleMetaAffiliationPipe()