@@ -0,0 +1,2455 @@
+#!/usr/bin/env python%0A%0A%22%22%22%0ACreated by: Lee Bergstrand (2017)%0A%0ADescription: A simple unittest for testing the literature reference module.%0A%22%22%22%0A%0Aimport unittest%0Afrom modules.literature_reference import parse_literature_references%0A%0A%0Aclass TestLiteratureReference(unittest.TestCase):%0A    %22%22%22A unit testing class for testing the literature_reference.py module. To be called by nosetests.%22%22%22%0A%0A    def test_parse_literature_reference(self):%0A        %22%22%22Test that literature reference rows can be parsed.%22%22%22%0A        literature_reference = %5B%0A            ('TH', '1'),%0A            ('RN', '%5B1%5D'),%0A            ('RM', '11952905'),%0A            ('RT', 'Identification of genes that are associated with DNA repeats.'),%0A            ('RA', 'Jansen R, Embden JD, Gaastra W, Schouls LM;'),%0A            ('RL', 'Mol Microbiol. 2002;43:1565-1575.'),%0A            ('CC', 'CRISPR repeats are by definition Clustered Regularly')%0A        %5D%0A%0A        reference = parse_literature_references(literature_reference)%0A%0A        self.assertEqual(len(reference), 1)%0A        first_reference = reference%5B0%5D%0A        self.assertEqual(first_reference.number, 1)%0A        self.assertEqual(first_reference.pubmed_id, 11952905)%0A        self.assertEqual(first_reference.title, 'Identification of genes that are associated with DNA repeats.')%0A        self.assertEqual(first_reference.authors, 'Jansen R, Embden JD, Gaastra W, Schouls LM;')%0A        self.assertEqual(first_reference.citation, 'Mol Microbiol. 2002;43:1565-1575.')%0A%0A    def test_parse_multiple_database_references(self):%0A        %22%22%22Test that literature reference rows consisting of multiple references can be parsed.%22%22%22%0A        literature_references = %5B%0A            ('TH', '1'),%0A            ('RN', '%5B1%5D'),%0A            ('RM', '11952905'),%0A            ('RT', 'Identification of genes that are associated with DNA repeats in prokaryotes.'),%0A            ('RA', 'Jansen R, Embden JD, Gaastra W, Schouls LM;'),%0A            ('RL', 'Mol Microbiol. 2002;43:1565-1575.'),%0A            ('RN', '%5B2%5D'),%0A            ('RM', '16292354'),%0A            ('RT', 'A guild of 45 CRISPR-associated (Cas) protein families.'),%0A            ('RA', 'Haft DH, Selengut J, Mongodin EF, Nelson KE;'),%0A            ('RL', 'PLoS Comput Biol. 2005;1:e60.'),%0A            ('CC', 'CRISPR repeats are by definition Clustered Regularly Interspaced Short')%0A        %5D%0A%0A        references = parse_literature_references(literature_references)%0A%0A        self.assertEqual(len(references), 2)%0A

Add automated tests for literature reference module.