Commit 13ad2808 authored by Jamesie Pic's avatar Jamesie Pic

Tested API

parent 28e591c7
......@@ -7,9 +7,9 @@ python:
before_install:
- pip install codecov
install:
- pip install $DJANGO pep8 flake8 pytest-django pytest-cov codecov
- pip install $DJANGO pep8 flake8 pytest-django pytest-cov codecov django-responsediff
- pip install https://github.com/political-memory/django-representatives/archive/parltrack.tar.gz#egg=django-representatives
- pip install -e .
- pip install -e .[api]
script:
- django-admin migrate
- flake8 representatives_votes/ --exclude migrations --ignore E128
......
[
{
"fields": {
"updated": "2015-12-27T11:51:14.770Z",
"reference": "2012/2002(INI)",
"title": "Agenda for change: the future of EU development policy",
"text": "",
"created": "2015-12-27T11:51:14.770Z",
"link": "http://www.europarl.europa.eu/oeil/popups/ficheprocedure.do?reference=2012/2002(INI)",
"fingerprint": "9e2cccdc5f6d22afd008af8b5b55dc193c27c5d6"
},
"model": "representatives_votes.dossier",
"pk": 1
},
{
"fields": {
"updated": "2015-12-27T11:51:14.781Z",
"reference": "2015/2132(BUD)",
"title": "2016 general budget: all sections",
"text": "",
"created": "2015-12-27T11:51:14.781Z",
"link": "http://www.europarl.europa.eu/oeil/popups/ficheprocedure.do?reference=2015/2132(BUD)",
"fingerprint": "e6856e0880e701c1022f23d595cc37a9a1cdcca8"
},
"model": "representatives_votes.dossier",
"pk": 2
},
{
"fields": {
"updated": "2015-12-27T11:51:24.327Z",
"total_for": 0,
"description": "",
"reference": "A7-0234/2012",
"title": "A7-0234/2012 - Charles Goerens - \u00a7 31",
"dossier": 1,
"created": "2015-12-27T11:51:24.327Z",
"kind": "\u00a7 31",
"datetime": "2012-10-23T16:31:10Z",
"total_against": 0,
"fingerprint": "6c1fb67feac3ab2ea567b37aa7dfd0d578bc04b4",
"total_abstain": 2
},
"model": "representatives_votes.proposal",
"pk": 1
},
{
"fields": {
"updated": "2015-12-27T11:51:24.340Z",
"total_for": 2,
"description": "",
"reference": "A7-0234/2012",
"title": "A7-0234/2012 - Charles Goerens - R\u00e9solution",
"dossier": 1,
"created": "2015-12-27T11:51:24.340Z",
"kind": "R\u00e9solution",
"datetime": "2012-10-23T16:34:32Z",
"total_against": 0,
"fingerprint": "18df8a97581832a95f3bdfb8c14ba2b05abb91e9",
"total_abstain": 0
},
"model": "representatives_votes.proposal",
"pk": 2
},
{
"fields": {
"updated": "2015-12-27T11:51:24.353Z",
"total_for": 0,
"description": "",
"reference": "A8-0298/2015",
"title": "A8-0298/2015 - Jos\u00e9 Manuel Fernandes et G\u00e9rard Deprez - Am 4",
"dossier": 2,
"created": "2015-12-27T11:51:24.353Z",
"kind": "Am 4",
"datetime": "2015-10-28T11:59:35Z",
"total_against": 2,
"fingerprint": "4e575a1bc17602d23d2f0acf8ee482ebe08de79c",
"total_abstain": 0
},
"model": "representatives_votes.proposal",
"pk": 3
},
{
"fields": {
"updated": "2015-12-27T11:51:24.367Z",
"total_for": 1,
"description": "",
"reference": "A8-0298/2015",
"title": "A8-0298/2015 - Jos\u00e9 Manuel Fernandes et G\u00e9rard Deprez - Am 29",
"dossier": 2,
"created": "2015-12-27T11:51:24.367Z",
"kind": "Am 29",
"datetime": "2015-10-28T12:00:12Z",
"total_against": 1,
"fingerprint": "fc786534e832d9af7e2cdcd0b0952d7d60bb4331",
"total_abstain": 0
},
"model": "representatives_votes.proposal",
"pk": 4
},
{
"fields": {
"updated": "2015-12-27T11:51:24.386Z",
"total_for": 0,
"description": "",
"reference": "A8-0298/2015",
"title": "A8-0298/2015 - Jos\u00e9 Manuel Fernandes et G\u00e9rard Deprez - Am 31",
"dossier": 2,
"created": "2015-12-27T11:51:24.386Z",
"kind": "Am 31",
"datetime": "2015-10-28T12:00:42Z",
"total_against": 1,
"fingerprint": "90c022cf70dc6ceff796b876d3e1b814620c8637",
"total_abstain": 1
},
"model": "representatives_votes.proposal",
"pk": 5
},
{
"fields": {
"updated": "2015-12-27T11:51:24.411Z",
"total_for": 2,
"description": "",
"reference": "A8-0298/2015",
"title": "A8-0298/2015 - Jos\u00e9 Manuel Fernandes et G\u00e9rard Deprez - Am 30",
"dossier": 2,
"created": "2015-12-27T11:51:24.411Z",
"kind": "Am 30",
"datetime": "2015-10-28T12:01:09Z",
"total_against": 0,
"fingerprint": "5b3aa46182803c11d70ccfec666234b9fe2f44a7",
"total_abstain": 0
},
"model": "representatives_votes.proposal",
"pk": 6
},
{
"fields": {
"representative_name": "",
"position": "abstain",
"proposal": 1,
"representative": 2
},
"model": "representatives_votes.vote",
"pk": 1
},
{
"fields": {
"representative_name": "",
"position": "abstain",
"proposal": 1,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 2
},
{
"fields": {
"representative_name": "",
"position": "for",
"proposal": 2,
"representative": 2
},
"model": "representatives_votes.vote",
"pk": 3
},
{
"fields": {
"representative_name": "",
"position": "for",
"proposal": 2,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 4
},
{
"fields": {
"representative_name": "",
"position": "against",
"proposal": 3,
"representative": 2
},
"model": "representatives_votes.vote",
"pk": 5
},
{
"fields": {
"representative_name": "",
"position": "against",
"proposal": 3,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 6
},
{
"fields": {
"representative_name": "",
"position": "for",
"proposal": 4,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 7
},
{
"fields": {
"representative_name": "",
"position": "against",
"proposal": 4,
"representative": 2
},
"model": "representatives_votes.vote",
"pk": 8
},
{
"fields": {
"representative_name": "",
"position": "abstain",
"proposal": 5,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 9
},
{
"fields": {
"representative_name": "",
"position": "against",
"proposal": 5,
"representative": 2
},
"model": "representatives_votes.vote",
"pk": 10
},
{
"fields": {
"representative_name": "",
"position": "for",
"proposal": 6,
"representative": 1
},
"model": "representatives_votes.vote",
"pk": 11
},
{
"fields": {
"code": "AT",
"name": "Austria"
},
"model": "representatives.country",
"pk": 1043
},
{
"fields": {
"code": "SE",
"name": "Sweden"
},
"model": "representatives.country",
"pk": 1202
},
{
"fields": {
"updated": "2015-12-13T02:07:23.995Z",
"last_name": "PIRKER",
"photo": "http://www.europarl.europa.eu/mepphoto/2307.jpg",
"created": "2015-12-13T02:07:23.995Z",
"gender": 2,
"remote_id": "2307",
"first_name": "Hubert",
"cv": "Transport and security spokesman, \u00d6VP Delegation, European Parliament;\nsecurity spokesman, \u00d6VP Delegation, European Parliament (2006-2009); security spokesman (coordinator), EPP Group (1999-2004); Deputy Head of \u00d6VP Delegation, European Parliament (1996-2004);",
"active": false,
"birth_place": "Gries",
"full_name": "Hubert PIRKER",
"fingerprint": "2a3c90346d40e9c540050534d832ceb3e0d25a49",
"birth_date": "1948-10-03",
"slug": "hubert-pirker"
},
"model": "representatives.representative",
"pk": 1
},
{
"fields": {
"updated": "2015-12-13T02:07:24.361Z",
"last_name": "LUDVIGSSON",
"photo": "http://www.europarl.europa.eu/mepphoto/96673.jpg",
"created": "2015-12-13T02:07:24.361Z",
"gender": 2,
"remote_id": "96673",
"first_name": "Olle",
"cv": "",
"active": true,
"birth_place": "H\u00e4ls\u00f6",
"full_name": "Olle LUDVIGSSON",
"fingerprint": "314d0f4c25af31bfa2a6b286838367994b902615",
"birth_date": "1948-10-28",
"slug": "olle-ludvigsson"
},
"model": "representatives.representative",
"pk": 2
},
{
"fields": {
"email": "olle.ludvigsson@europarl.europa.eu",
"updated": "2015-12-13T02:07:24.404Z",
"representative": 2,
"kind": "official",
"created": "2015-12-13T02:07:24.404Z"
},
"model": "representatives.email",
"pk": 1
},
{
"fields": {
"url": "http://www.sap.se/olle",
"updated": "2015-12-13T02:07:24.406Z",
"representative": 2,
"kind": "",
"created": "2015-12-13T02:07:24.406Z"
},
"model": "representatives.website",
"pk": 1
},
{
"fields": {
"url": "http://twitter.com/olleludvigsson",
"updated": "2015-12-13T02:07:24.407Z",
"representative": 2,
"kind": "twitter",
"created": "2015-12-13T02:07:24.407Z"
},
"model": "representatives.website",
"pk": 2
},
{
"fields": {
"url": "https://www.facebook.com/olle.ludvigsson",
"updated": "2015-12-13T02:07:24.408Z",
"representative": 2,
"kind": "facebook",
"created": "2015-12-13T02:07:24.408Z"
},
"model": "representatives.website",
"pk": 3
},
{
"fields": {
"updated": "2015-12-13T02:07:23.997Z",
"name": "Committee on Employment and Social Affairs",
"created": "2015-12-13T02:07:23.996Z",
"kind": "committee",
"abbreviation": "EMPL",
"fingerprint": "7f0e6d2c3342dde2c6077e127a418a19e0e891bb"
},
"model": "representatives.group",
"pk": 1
},
{
"fields": {
"updated": "2015-12-13T02:07:24.002Z",
"name": "Delegation for relations with the countries of Southeast Asia and the Association of Southeast Asian Nations (ASEAN)",
"created": "2015-12-13T02:07:24.002Z",
"kind": "delegation",
"abbreviation": "",
"fingerprint": "23bb5f3e808b2ea6a02ddbe01705714ecfe7a82a"
},
"model": "representatives.group",
"pk": 2
},
{
"fields": {
"updated": "2015-12-13T02:07:24.006Z",
"name": "Delegation for relations with the Member States of ASEAN, South-east Asia and the Republic of Korea",
"created": "2015-12-13T02:07:24.005Z",
"kind": "delegation",
"abbreviation": "",
"fingerprint": "3d0bc2c9506b90bb22e02e3866c1d14c9be1867e"
},
"model": "representatives.group",
"pk": 3
},
{
"fields": {
"updated": "2015-12-13T02:07:24.009Z",
"name": "Group of the European People's Party (Christian Democrats) and European Democrats",
"created": "2015-12-13T02:07:24.009Z",
"kind": "group",
"abbreviation": "PPE-DE",
"fingerprint": "cab4a9a406aa114716967e6fd6e698dfd2421794"
},
"model": "representatives.group",
"pk": 4
},
{
"fields": {
"updated": "2015-12-13T02:07:24.013Z",
"name": "Group of the European People's Party (Christian-Democratic Group)",
"created": "2015-12-13T02:07:24.013Z",
"kind": "group",
"abbreviation": "EPP",
"fingerprint": "669373eca233e4101a0af25debda58fdfd59741f"
},
"model": "representatives.group",
"pk": 5
},
{
"fields": {
"updated": "2015-12-13T02:07:24.017Z",
"name": "Austria",
"created": "2015-12-13T02:07:24.017Z",
"kind": "country",
"abbreviation": "AT",
"fingerprint": "7b37fb29f750421d82ee36539c2cb5bca9cef938"
},
"model": "representatives.group",
"pk": 6
},
{
"fields": {
"updated": "2015-12-13T02:07:24.024Z",
"name": "Conference of Delegation Chairs",
"created": "2015-12-13T02:07:24.024Z",
"kind": "organization",
"abbreviation": "",
"fingerprint": "eb99949bb40fd2e906d738eef276a912c5412f67"
},
"model": "representatives.group",
"pk": 7
},
{
"fields": {
"updated": "2015-12-13T02:07:24.362Z",
"name": "Committee on Economic and Monetary Affairs",
"created": "2015-12-13T02:07:24.362Z",
"kind": "committee",
"abbreviation": "ECON",
"fingerprint": "2da973401cd76bb56b36f3a9162cda13d2f2d8f3"
},
"model": "representatives.group",
"pk": 8
},
{
"fields": {
"updated": "2015-12-13T02:07:24.366Z",
"name": "Committee on Industry, Research and Energy",
"created": "2015-12-13T02:07:24.366Z",
"kind": "committee",
"abbreviation": "ITRE",
"fingerprint": "17ff1a9fe036e400612c9153c1647a8258c34d63"
},
"model": "representatives.group",
"pk": 9
},
{
"fields": {
"updated": "2015-12-13T02:07:24.372Z",
"name": "Delegation to the EU-Serbia Stabilisation and Association Parliamentary Committee",
"created": "2015-12-13T02:07:24.372Z",
"kind": "delegation",
"abbreviation": "",
"fingerprint": "a24b4e184cf25f0e300c07a1402b65243f5ba93d"
},
"model": "representatives.group",
"pk": 10
},
{
"fields": {
"updated": "2015-12-13T02:07:24.375Z",
"name": "Delegation for relations with Bosnia and Herzegovina, and Kosovo",
"created": "2015-12-13T02:07:24.375Z",
"kind": "delegation",
"abbreviation": "",
"fingerprint": "3d2d9370cc501b1208a4692baf69deeab1e65d0a"
},
"model": "representatives.group",
"pk": 11
},
{
"fields": {
"updated": "2015-12-13T02:07:24.379Z",
"name": "Delegation for relations with Australia and New Zealand",
"created": "2015-12-13T02:07:24.379Z",
"kind": "delegation",
"abbreviation": "",
"fingerprint": "1e5d79317501c2fdf7f36846ad1d5491a244a103"
},
"model": "representatives.group",
"pk": 12
},
{
"fields": {
"updated": "2015-12-13T02:07:24.383Z",
"name": "Group of the Progressive Alliance of Socialists and Democrats in the European Parliament",
"created": "2015-12-13T02:07:24.383Z",
"kind": "group",
"abbreviation": "SD",
"fingerprint": "729890eba3ce20f90808b32110871d1fe41b53b6"
},
"model": "representatives.group",
"pk": 13
},
{
"fields": {
"updated": "2015-12-13T02:07:24.389Z",
"name": "Sweden",
"created": "2015-12-13T02:07:24.389Z",
"kind": "country",
"abbreviation": "SE",
"fingerprint": "ea4cacc64af470d01e5b4da150b8b9d3a9dc4bfe"
},
"model": "representatives.group",
"pk": 14
},
{
"fields": {
"country": null,
"updated": "2015-12-13T02:07:23.998Z",
"fingerprint": "bc0c3668435accfa5da4479c80478fe68d15ddb1",
"name": "European Parliament",
"created": "2015-12-13T02:07:23.998Z"
},
"model": "representatives.constituency",
"pk": 1
},
{
"fields": {
"country": 1043,
"updated": "2015-12-13T02:07:24.018Z",
"fingerprint": "74e9c77e0664716d098cb1194927b86f2aa55f7e",
"name": "\u00d6sterreichische Volkspartei",
"created": "2015-12-13T02:07:24.018Z"
},
"model": "representatives.constituency",
"pk": 2
},
{
"fields": {
"country": 1202,
"updated": "2015-12-13T02:07:24.390Z",
"fingerprint": "a8fa2ff595aedee63954c3b5ad6e1dcd5dfac910",
"name": "Arbetarepartiet- Socialdemokraterna",
"created": "2015-12-13T02:07:24.390Z"
},
"model": "representatives.constituency",
"pk": 3
},
{
"fields": {
"updated": "2015-12-13T02:07:24.001Z",
"group": 1,
"end_date": "1999-07-19",
"created": "2015-12-13T02:07:24.001Z",
"role": "Substitute",
"representative": 1,
"fingerprint": "9d2cdb45658e7b535e4b39de233b8e2f747bc1d1",
"link": "",
"begin_date": "1997-01-16",
"constituency": 1
},
"model": "representatives.mandate",
"pk": 1
},
{
"fields": {
"updated": "2015-12-13T02:07:24.005Z",
"group": 2,
"end_date": "2014-06-30",
"created": "2015-12-13T02:07:24.005Z",
"role": "Member",
"representative": 1,
"fingerprint": "18613b505dc43a9a3055bf7aed2b2651246838f8",
"link": "",
"begin_date": "2013-10-09",
"constituency": 1
},
"model": "representatives.mandate",
"pk": 2
},
{
"fields": {
"updated": "2015-12-13T02:07:24.008Z",
"group": 3,
"end_date": "1997-01-15",
"created": "2015-12-13T02:07:24.008Z",
"role": "Member",
"representative": 1,
"fingerprint": "fd6db1f22987be42ba290e1f8fbfda6cc109dd7e",
"link": "",
"begin_date": "1996-11-14",
"constituency": 1
},
"model": "representatives.mandate",
"pk": 3
},
{
"fields": {
"updated": "2015-12-13T02:07:24.011Z",
"group": 4,
"end_date": "2004-07-19",
"created": "2015-12-13T02:07:24.011Z",
"role": "Member",
"representative": 1,
"fingerprint": "1d054cac567dd5bc523ddf2063dd05971d7b9c88",
"link": "",
"begin_date": "1999-07-20",
"constituency": 1
},
"model": "representatives.mandate",
"pk": 4
},
{
"fields": {
"updated": "2015-12-13T02:07:24.015Z",
"group": 5,
"end_date": "1999-07-19",
"created": "2015-12-13T02:07:24.015Z",
"role": "Member",
"representative": 1,
"fingerprint": "0cfeaa28bfa4036f385bd7d81f29be83120fc985",
"link": "",
"begin_date": "1996-11-11",
"constituency": 1
},
"model": "representatives.mandate",
"pk": 5
},
{
"fields": {
"updated": "2015-12-13T02:07:24.020Z",
"group": 6,
"end_date": "2004-07-19",
"created": "2015-12-13T02:07:24.020Z",
"role": "",
"representative": 1,
"fingerprint": "d761586241fb47f9fae7035365f5253cd8a363fb",
"link": "",
"begin_date": "1999-07-20",
"constituency": 2
},
"model": "representatives.mandate",
"pk": 6
},
{
"fields": {
"updated": "2015-12-13T02:07:24.023Z",
"group": 6,
"end_date": "1999-07-19",
"created": "2015-12-13T02:07:24.023Z",
"role": "",
"representative": 1,
"fingerprint": "5e7d170fc24b161457a09baebcc388edcbddc954",
"link": "",
"begin_date": "1996-11-11",
"constituency": 2
},
"model": "representatives.mandate",
"pk": 7
},
{
"fields": {
"updated": "2015-12-13T02:07:24.026Z",
"group": 7,
"end_date": "2009-07-13",
"created": "2015-12-13T02:07:24.026Z",