src/pds_doi_service/core/outputs/test/datacite_test.py
def _compare_doi_to_expected(self, doi):
        """
        Helper method to test that both mandatory and optional fields from
        a parsed Doi match the expected values and/or formats.
        """
        self.assertListEqual(doi.authors, self.expected_authors)
        self.assertEqual(doi.contributor, "Engineering")
        self.assertIsInstance(doi.date_record_added, datetime)
        self.assertIsInstance(doi.date_record_updated, datetime)
        self.assertEqual(
            doi.description,
            "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products",
        )
        self.assertEqual(doi.doi, "10.13143/yzw2-vz66")
        self.assertListEqual(doi.editors, self.expected_editors)
        self.assertEqual(doi.id, "yzw2-vz66")
        self.assertSetEqual(doi.keywords, self.expected_keywords)
        self.assertEqual(doi.product_type, ProductType.Dataset)
        self.assertEqual(doi.product_type_specific, "PDS4 Refereed Data Bundle")
        self.assertIsInstance(doi.publication_date, datetime)
        self.assertEqual(doi.publisher, "NASA Planetary Data System")
        self.assertEqual(doi.pds_identifier, "urn:nasa:pds:insight_cameras::1.0")
        # Check that site url HTML was un-escaped as expected
        self.assertIn("&", doi.site_url)
        self.assertNotIn("&amp;", doi.site_url)
        self.assertEqual(doi.status, DoiStatus.Draft)
        self.assertEqual(doi.title, "InSight Cameras Bundle")

        Helper method to test that both mandatory and optional fields from
        a parsed Doi match the expected values and/or formats.
        
Helper method to test that both mandatory and optional fields from
a parsed Doi match the expected values and/or formats.
Helper method to test that both mandatory and optional fields from a parsed Doi match the expected values and / or formats .
def _compare_doi_to_expected(self, doi):
        self.assertListEqual(doi.authors, self.expected_authors)
        self.assertEqual(doi.contributor, "Engineering")
        self.assertIsInstance(doi.date_record_added, datetime)
        self.assertIsInstance(doi.date_record_updated, datetime)
        self.assertEqual(
            doi.description,
            "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products",
        )
        self.assertEqual(doi.doi, "10.13143/yzw2-vz66")
        self.assertListEqual(doi.editors, self.expected_editors)
        self.assertEqual(doi.id, "yzw2-vz66")
        self.assertSetEqual(doi.keywords, self.expected_keywords)
        self.assertEqual(doi.product_type, ProductType.Dataset)
        self.assertEqual(doi.product_type_specific, "PDS4 Refereed Data Bundle")
        self.assertIsInstance(doi.publication_date, datetime)
        self.assertEqual(doi.publisher, "NASA Planetary Data System")
        self.assertEqual(doi.pds_identifier, "urn:nasa:pds:insight_cameras::1.0")
        self.assertIn("&", doi.site_url)
        self.assertNotIn("&amp;", doi.site_url)
        self.assertEqual(doi.status, DoiStatus.Draft)
        self.assertEqual(doi.title, "InSight Cameras Bundle")
def _compare_doi_to_expected ( self , doi ) : self . assertListEqual ( doi . authors , self . expected_authors ) self . assertEqual ( doi . contributor , "Engineering" ) self . assertIsInstance ( doi . date_record_added , datetime ) self . assertIsInstance ( doi . date_record_updated , datetime ) self . assertEqual ( doi . description , "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products" , ) self . assertEqual ( doi . doi , "10.13143/yzw2-vz66" ) self . assertListEqual ( doi . editors , self . expected_editors ) self . assertEqual ( doi . id , "yzw2-vz66" ) self . assertSetEqual ( doi . keywords , self . expected_keywords ) self . assertEqual ( doi . product_type , ProductType . Dataset ) self . assertEqual ( doi . product_type_specific , "PDS4 Refereed Data Bundle" ) self . assertIsInstance ( doi . publication_date , datetime ) self . assertEqual ( doi . publisher , "NASA Planetary Data System" ) self . assertEqual ( doi . pds_identifier , "urn:nasa:pds:insight_cameras::1.0" ) self . assertIn ( "&" , doi . site_url ) self . assertNotIn ( "&amp;" , doi . site_url ) self . assertEqual ( doi . status , DoiStatus . Draft ) self . assertEqual ( doi . title , "InSight Cameras Bundle" )
Helper method to test that both mandatory and optional fields from
a parsed Doi match the expected values and/or formats.
Helper method to test that both mandatory and optional fields from a parsed Doi match the expected values and / or formats .
"""
        Helper method to test that both mandatory and optional fields from
        a parsed Doi match the expected values and/or formats.
        """ # Check that site url HTML was un-escaped as expected
self
doi