Commit f3eabc18 authored by Nicolas Joyard's avatar Nicolas Joyard

Fix more tests :)

parent e03f7bc8
......@@ -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\u00e9 Manuel Fernandes et G\u00e9rard 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\u00e9 Manuel Fernandes et G\u00e9rard 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\u00e9 Manuel Fernandes et G\u00e9rard Deprez - Am 29",
"2015/2132(BUD)"
],
"representative": [
"olle-ludvigsson-1948-10-28"
]
},
"model": "representatives_votes.vote",
"pk": 2
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment