Skip to content

Commit b5a2de3

Browse files
Add additional votes API tests (#1166)
2 parents 745e83f + 11807e4 commit b5a2de3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

backend/tests/api/test_votes_api.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
import pytest
44

55
from howtheyvote.models import (
6+
Committee,
67
Country,
78
Fragment,
89
Group,
910
GroupMembership,
1011
Member,
1112
MemberVote,
13+
OEILSubject,
1214
Vote,
1315
VotePosition,
1416
VoteResult,
@@ -74,6 +76,8 @@ def records(db_session):
7476
),
7577
],
7678
result=VoteResult.ADOPTED,
79+
oeil_subjects=[OEILSubject["2.10.01"]],
80+
responsible_committees=[Committee["IMCO"]],
7781
)
7882

7983
db_session.add_all([john, jane, vote])
@@ -571,8 +575,19 @@ def test_votes_api_show(records, db_session, api):
571575
"result": "ADOPTED",
572576
"geo_areas": [],
573577
"eurovoc_concepts": [],
574-
"oeil_subjects": [],
575-
"responsible_committees": [],
578+
"oeil_subjects": [
579+
{
580+
"code": "2.10.01",
581+
"label": "Customs union, tax and duty-free, Community transit",
582+
},
583+
],
584+
"responsible_committees": [
585+
{
586+
"code": "IMCO",
587+
"abbreviation": "IMCO",
588+
"label": "Committee on the Internal Market and Consumer Protection",
589+
},
590+
],
576591
"related": [],
577592
"sources": [
578593
{

0 commit comments

Comments
 (0)