def ensure_doi_exists(sender, **kwargs): experiment = kwargs['instance'] if settings.DOI_ENABLE and experiment.public: doi_url = settings.DOI_BASE_URL + experiment.get_absolute_url() from tardis.tardis_portal.ands_doi import DOIService doi_service = DOIService(experiment) doi_service.get_or_mint_doi(doi_url)
def ensure_doi_exists(sender, **kwargs): experiment = kwargs['instance'] if settings.DOI_ENABLE and experiment.public_access != Experiment.PUBLIC_ACCESS_NONE: doi_url = settings.DOI_BASE_URL + experiment.get_absolute_url() from tardis.tardis_portal.ands_doi import DOIService doi_service = DOIService(experiment) doi_service.get_or_mint_doi(doi_url)
def test_get_doi_none(self): doi_service = DOIService(self.expt) self.assertEquals(None, doi_service.get_doi())
def test_init(self): doi_service = DOIService(self.expt)