Skip to content

Commit

Permalink
Merge pull request #73 from robertatakenaka/tk72
Browse files Browse the repository at this point in the history
[tk72] Incluir o atributo scimago_id em Journal
  • Loading branch information
jfunez authored Sep 18, 2018
2 parents 89f9b6d + 7ccffe2 commit 50b05f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions opac_schema/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ class Journal(Document):
url_segment = StringField()

metrics = EmbeddedDocumentField(JounalMetrics)
scimago_id = StringField()

meta = {
'collection': 'journal',
Expand All @@ -355,6 +356,7 @@ class Journal(Document):
'url_segment',
'issue_count',
'current_status',
'scimago_id',
]
}

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="Opac Schema",
version='2.46',
version='2.47',
description="Schema of SciELO OPAC",
author="SciELO",
author_email="[email protected]",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ def test_create_only_required_fields_success(self):
'jid': jid,
'title': 'The Dummy Journal',
'acronym': 'dj',
'is_public': True
'is_public': True,
'scimago_id': '4500151524',
}

# when
journal_doc = Journal(**journal_data)
journal_doc.save()

# then
self.assertEqual('4500151524', journal_doc.scimago_id)
self.assertEqual(_id, journal_doc._id)
self.assertEqual(jid, journal_doc.jid)
self.assertEqual(1, Journal.objects.all().count())

0 comments on commit 50b05f8

Please sign in to comment.