Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnestaP committed Feb 20, 2024
1 parent 152ac68 commit f401408
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scoap3/articles/tests/test_article_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.urls import reverse
from rest_framework import status

from scoap3.articles.models import Article
from scoap3.articles.models import Article, ArticleIdentifier
from scoap3.users.tests.factories import UserFactory

pytestmark = pytest.mark.django_db
Expand Down Expand Up @@ -119,3 +119,12 @@ def test_create_article_from_workflow(self):
content_type="application/json",
)
assert response.status_code == status.HTTP_200_OK
doi = data.get("dois")[0].get("value")
assert (
len(
ArticleIdentifier.objects.filter(
identifier_type="DOI", identifier_value=doi
)
)
== 1
)

0 comments on commit f401408

Please sign in to comment.