def test_mount_journals_issues_link(self): journals_issues_link = mount_journals_issues_link(self.issues) self.assertEqual(journals_issues_link["1678-4464"], [{ 'id': '1678-4464-2018-v1-n1', 'order': '1001', 'year': '2018', 'volume': '1', 'number': '1' }])
def test_mount_journals_issues_link(self): journals_issues_link = mount_journals_issues_link(self.issues) self.assertEqual( journals_issues_link["1678-4464"], [{ "id": "1678-4464-2018-v1-n1", "order": "1001", "year": "2018", "volume": "1", "number": "1", }], )
def test_mount_journals_issues_link_should_not_contains_duplicates_issues_ids( self): issues = self.issues * 3 journals_issues_link = mount_journals_issues_link(issues) self.assertEqual(journals_issues_link["1678-4464"], [{ 'id': '1678-4464-2018-v1-n1', 'order': '1001', 'year': '2018', 'volume': '1', 'number': '1' }]) self.assertEqual(len(journals_issues_link["1678-4464"]), 1)
def test_mount_journals_issues_link_should_not_contains_duplicates_issues_ids( self): issues = self.issues * 3 journals_issues_link = mount_journals_issues_link(issues) self.assertEqual( journals_issues_link["1678-4464"], [{ "id": "1678-4464-2018-v1-n1", "order": "1001", "year": "2018", "volume": "1", "number": "1", }], ) self.assertEqual(len(journals_issues_link["1678-4464"]), 1)
def test_mount_journals_issues_link_should_not_contains_ahead_of_print( self): self.issues[-1]["v31"][0]["_"] = "ahead" journals_issues_link = mount_journals_issues_link(self.issues) self.assertDictEqual(journals_issues_link, {})
def test_mount_journals_issues_link_should_not_contains_pressrelease(self): self.issues[-1]["v31"][0]["_"] = "pr" journals_issues_link = mount_journals_issues_link(self.issues) self.assertDictEqual(journals_issues_link, {})