-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/3573_autocheck_article_uploaded' into develop
- Loading branch information
Showing
14 changed files
with
147 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
} | ||
|
||
SEAL_FORM_EXPANDED = { | ||
"doaj_seal": False, | ||
"doaj_seal": [], | ||
} | ||
|
||
JOURNAL_LIKE_BIBJSON = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import json | ||
|
||
from doajtest import helpers | ||
from doajtest.fixtures import JournalFixtureFactory | ||
from doajtest.fixtures.accounts import create_maned_a | ||
from doajtest.helpers import DoajTestCase | ||
from portality import models | ||
from portality.util import url_for | ||
|
||
|
||
class TestViewAdmin(DoajTestCase): | ||
|
||
def setUp(self): | ||
super().setUp() | ||
self.acc = create_maned_a(save=True) | ||
|
||
def test_journal_article_info(self): | ||
journal = models.Journal( | ||
**JournalFixtureFactory.make_journal_source() | ||
) | ||
journal.save(blocking=True) | ||
models.Journal.refresh() | ||
|
||
with self.app_test.test_client() as client: | ||
resp = helpers.login(client, self.acc.email, 'password') | ||
assert resp.status_code == 200 | ||
|
||
resp = client.get(url_for("admin.journal_article_info", journal_id=journal.id)) | ||
assert resp.status_code == 200 | ||
assert json.loads(resp.data) == {'n_articles': 0} | ||
|
||
def test_journal_article_info__not_found(self): | ||
with self.app_test.test_client() as client: | ||
helpers.login(client, self.acc.email, 'password') | ||
|
||
resp = client.get(url_for("admin.journal_article_info", journal_id='aksjdlaksjdlkajsdlkajsdlk')) | ||
assert resp.status_code == 404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
| Short | Description | | ||
|---------|------------------------------| | ||
| bgjob | background job | | ||
| noti | notification | | ||
| noqa | NO-QA (NO Quality Assurance) | | ||
| inst | instance | | ||
| fmt | format | | ||
| exparam | extra parameter | | ||
| maned | Managing Editor | | ||
| gsheet | Google Sheet | | ||
| svc | service | | ||
| Short | Description | | ||
|----------|------------------------------| | ||
| bgjob | background job | | ||
| noti | notification | | ||
| noqa | NO-QA (NO Quality Assurance) | | ||
| inst | instance | | ||
| fmt | format | | ||
| exparam | extra parameter | | ||
| maned | Managing Editor | | ||
| gsheet | Google Sheet | | ||
| svc,serv | service | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters