Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TAlone
memopol
Commits
f3eabc18
Commit
f3eabc18
authored
Oct 05, 2016
by
Nicolas Joyard
Browse files
Fix more tests :)
parent
e03f7bc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/representatives_votes/contrib/parltrack/tests/single_expected.json
View file @
f3eabc18
...
...
@@ -2,22 +2,21 @@
{
"fields"
:
{
"text"
:
""
,
"updated"
:
"2016-07-08T05:20:11.662Z"
,
"title"
:
"2016 general budget: all sections"
,
"reference"
:
"2015/2132(BUD)"
,
"created"
:
"2016-07-08T05:20:11.662Z"
"reference"
:
"2015/2132(BUD)"
},
"model"
:
"representatives_votes.dossier"
,
"pk"
:
1
"model"
:
"representatives_votes.dossier"
},
{
"fields"
:
{
"updated"
:
"2016-07-08T05:20:11.664Z"
,
"title"
:
""
,
"dossier"
:
1
,
"created"
:
"2016-07-08T05:20:11.664Z"
,
"dossier"
:
[
"2015/2132(BUD)"
],
"kind"
:
"procedure-file"
,
"chamber"
:
1
,
"chamber"
:
[
"EP"
],
"link"
:
"http://www.europarl.europa.eu/oeil/popups/ficheprocedure.do?reference=2015/2132(BUD)"
},
"model"
:
"representatives_votes.document"
,
...
...
@@ -25,27 +24,31 @@
},
{
"fields"
:
{
"updated"
:
"2016-07-08T05:21:34.553Z"
,
"total_for"
:
1
,
"description"
:
""
,
"reference"
:
"A8-0298/2015"
,
"title"
:
"A8-0298/2015 - Jos
\u
00e9 Manuel Fernandes et G
\u
00e9rard Deprez - Am 29"
,
"dossier"
:
1
,
"created"
:
"2016-07-08T05:20:11.696Z"
,
"dossier"
:
[
"2015/2132(BUD)"
],
"kind"
:
"Am 29"
,
"datetime"
:
"2015-10-28T12:00:12Z"
,
"total_against"
:
1
,
"total_abstain"
:
0
},
"model"
:
"representatives_votes.proposal"
,
"pk"
:
1
"model"
:
"representatives_votes.proposal"
},
{
"fields"
:
{
"representative_name"
:
""
,
"position"
:
"for"
,
"proposal"
:
1
,
"representative"
:
1
"proposal"
:
[
"A8-0298/2015 - Jos
\u
00e9 Manuel Fernandes et G
\u
00e9rard Deprez - Am 29"
,
"2015/2132(BUD)"
],
"representative"
:
[
"hubert-pirker-1948-10-03"
]
},
"model"
:
"representatives_votes.vote"
,
"pk"
:
1
...
...
@@ -54,8 +57,13 @@
"fields"
:
{
"representative_name"
:
""
,
"position"
:
"against"
,
"proposal"
:
1
,
"representative"
:
2
"proposal"
:
[
"A8-0298/2015 - Jos
\u
00e9 Manuel Fernandes et G
\u
00e9rard Deprez - Am 29"
,
"2015/2132(BUD)"
],
"representative"
:
[
"olle-ludvigsson-1948-10-28"
]
},
"model"
:
"representatives_votes.vote"
,
"pk"
:
2
...
...
src/representatives_votes/contrib/parltrack/tests/test_parltrack_import.py
View file @
f3eabc18
...
...
@@ -45,8 +45,11 @@ class ParltrackVotesTest(TestBase):
representatives
.
__path__
[
0
]),
'fixtures'
,
'representatives_test.json'
))
with
self
.
assertNumQueries
(
22
):
self
.
_test_import
(
'single'
,
import_dossiers
.
import_single
)
with
mock
.
patch
(
'representatives_votes.contrib.parltrack.import_votes'
'.Command.should_skip'
)
as
should_skip
:
should_skip
.
return_value
=
False
with
self
.
assertNumQueries
(
35
):
self
.
_test_import
(
'single'
,
import_dossiers
.
import_single
)
def
test_parltrack_sync_dossier
(
self
):
for
model
in
(
Representative
,
Dossier
,
Proposal
,
Vote
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment