Commit 82a3b1dc authored by Nicolas Joyard's avatar Nicolas Joyard

Fix rep import tests (using natural keys)

parent cf3db8a5
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
"birth_date": "1952-07-15", "birth_date": "1952-07-15",
"slug": "bernard-roman-1952-07-15" "slug": "bernard-roman-1952-07-15"
}, },
"model": "representatives.representative", "model": "representatives.representative"
"pk": 1
}, },
{ {
"fields": { "fields": {
...@@ -28,13 +27,14 @@ ...@@ -28,13 +27,14 @@
"birth_date": "1959-06-16", "birth_date": "1959-06-16",
"slug": "david-assouline-1959-06-16" "slug": "david-assouline-1959-06-16"
}, },
"model": "representatives.representative", "model": "representatives.representative"
"pk": 2
}, },
{ {
"fields": { "fields": {
"email": "contact@bernard-roman.org", "email": "contact@bernard-roman.org",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"kind": "other" "kind": "other"
}, },
"model": "representatives.email", "model": "representatives.email",
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
{ {
"fields": { "fields": {
"email": "broman@assemblee-nationale.fr", "email": "broman@assemblee-nationale.fr",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"kind": "official" "kind": "official"
}, },
"model": "representatives.email", "model": "representatives.email",
...@@ -52,7 +54,9 @@ ...@@ -52,7 +54,9 @@
{ {
"fields": { "fields": {
"email": "d.assouline@senat.fr", "email": "d.assouline@senat.fr",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "official" "kind": "official"
}, },
"model": "representatives.email", "model": "representatives.email",
...@@ -61,7 +65,9 @@ ...@@ -61,7 +65,9 @@
{ {
"fields": { "fields": {
"url": "http://www2.assemblee-nationale.fr/deputes/fiche/OMC_PA2611", "url": "http://www2.assemblee-nationale.fr/deputes/fiche/OMC_PA2611",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"kind": "AN" "kind": "AN"
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -70,7 +76,9 @@ ...@@ -70,7 +76,9 @@
{ {
"fields": { "fields": {
"url": "http://www.bernard-roman.net", "url": "http://www.bernard-roman.net",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"kind": "" "kind": ""
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -79,7 +87,9 @@ ...@@ -79,7 +87,9 @@
{ {
"fields": { "fields": {
"url": "http://twitter.com/bernardroman59", "url": "http://twitter.com/bernardroman59",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"kind": "twitter" "kind": "twitter"
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -88,7 +98,9 @@ ...@@ -88,7 +98,9 @@
{ {
"fields": { "fields": {
"url": "http://www.senat.fr/senateur/assouline_david04059m.html", "url": "http://www.senat.fr/senateur/assouline_david04059m.html",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "SEN" "kind": "SEN"
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -97,7 +109,9 @@ ...@@ -97,7 +109,9 @@
{ {
"fields": { "fields": {
"url": "http://www.david-assouline.net", "url": "http://www.david-assouline.net",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "" "kind": ""
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -106,7 +120,9 @@ ...@@ -106,7 +120,9 @@
{ {
"fields": { "fields": {
"url": "https://www.facebook.com/DavAssouline", "url": "https://www.facebook.com/DavAssouline",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "facebook" "kind": "facebook"
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -115,7 +131,9 @@ ...@@ -115,7 +131,9 @@
{ {
"fields": { "fields": {
"url": "http://david-assouline.net", "url": "http://david-assouline.net",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "" "kind": ""
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -124,7 +142,9 @@ ...@@ -124,7 +142,9 @@
{ {
"fields": { "fields": {
"url": "http://twitter.com/dassouline", "url": "http://twitter.com/dassouline",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"kind": "twitter" "kind": "twitter"
}, },
"model": "representatives.website", "model": "representatives.website",
...@@ -134,12 +154,16 @@ ...@@ -134,12 +154,16 @@
"fields": { "fields": {
"city": "Paris", "city": "Paris",
"name": "Assembl\u00e9e nationale", "name": "Assembl\u00e9e nationale",
"country": 1095, "country": [
"FR"
],
"floor": "", "floor": "",
"number": "126", "number": "126",
"street": "Rue de l'Universit\u00e9", "street": "Rue de l'Universit\u00e9",
"office_number": "", "office_number": "",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"location": "", "location": "",
"kind": "official", "kind": "official",
"postcode": "75355" "postcode": "75355"
...@@ -151,12 +175,16 @@ ...@@ -151,12 +175,16 @@
"fields": { "fields": {
"city": "Lille", "city": "Lille",
"name": "Permanence", "name": "Permanence",
"country": 1095, "country": [
"FR"
],
"floor": "", "floor": "",
"number": "20", "number": "20",
"street": "Rue d'Arras", "street": "Rue d'Arras",
"office_number": "", "office_number": "",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"location": "", "location": "",
"kind": "", "kind": "",
"postcode": "59000" "postcode": "59000"
...@@ -168,12 +196,16 @@ ...@@ -168,12 +196,16 @@
"fields": { "fields": {
"city": "Lille", "city": "Lille",
"name": "", "name": "",
"country": 1095, "country": [
"FR"
],
"floor": "", "floor": "",
"number": "", "number": "",
"street": "", "street": "",
"office_number": "", "office_number": "",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"location": "", "location": "",
"kind": "", "kind": "",
"postcode": "59000" "postcode": "59000"
...@@ -185,12 +217,16 @@ ...@@ -185,12 +217,16 @@
"fields": { "fields": {
"city": "Paris", "city": "Paris",
"name": "Palais du Luxembourg", "name": "Palais du Luxembourg",
"country": 1095, "country": [
"FR"
],
"floor": "", "floor": "",
"number": "15", "number": "15",
"street": "Rue de Vaugirard", "street": "Rue de Vaugirard",
"office_number": "", "office_number": "",
"representative": 2, "representative": [
"david-assouline-1959-06-16"
],
"location": "", "location": "",
"kind": "official", "kind": "official",
"postcode": "75291" "postcode": "75291"
...@@ -201,7 +237,9 @@ ...@@ -201,7 +237,9 @@
{ {
"fields": { "fields": {
"number": "03 20 52 09 20", "number": "03 20 52 09 20",
"representative": 1, "representative": [
"bernard-roman-1952-07-15"
],
"address": 2, "address": 2,
"kind": "" "kind": ""
}, },
...@@ -214,36 +252,38 @@ ...@@ -214,36 +252,38 @@
"country": null, "country": null,
"name": "European Parliament" "name": "European Parliament"
}, },
"model": "representatives.chamber", "model": "representatives.chamber"
"pk": 1
}, },
{ {
"fields": { "fields": {
"abbreviation": "AN", "abbreviation": "AN",
"country": 1095, "country": [
"FR"
],
"name": "Assembl\u00e9e nationale" "name": "Assembl\u00e9e nationale"
}, },
"model": "representatives.chamber", "model": "representatives.chamber"
"pk": 2
}, },
{ {
"fields": { "fields": {
"abbreviation": "SEN", "abbreviation": "SEN",
"country": 1095, "country": [
"FR"
],
"name": "S\u00e9nat" "name": "S\u00e9nat"
}, },
"model": "representatives.chamber", "model": "representatives.chamber"
"pk": 3
}, },
{ {
"fields": { "fields": {
"name": "European Parliament", "name": "European Parliament",
"kind": "chamber", "kind": "chamber",
"abbreviation": "EP", "abbreviation": "EP",
"chamber": 1 "chamber": [
"EP"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 1
}, },
{ {
"fields": { "fields": {
...@@ -252,28 +292,29 @@ ...@@ -252,28 +292,29 @@
"abbreviation": "FR", "abbreviation": "FR",
"chamber": null "chamber": null
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 2
}, },
{ {
"fields": { "fields": {
"name": "Assembl\u00e9e nationale", "name": "Assembl\u00e9e nationale",
"kind": "chamber", "kind": "chamber",
"abbreviation": "AN", "abbreviation": "AN",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 3
}, },
{ {
"fields": { "fields": {
"name": "Socialiste, r\u00e9publicain et citoyen", "name": "Socialiste, r\u00e9publicain et citoyen",
"kind": "group", "kind": "group",
"abbreviation": "SRC", "abbreviation": "SRC",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 4
}, },
{ {
"fields": { "fields": {
...@@ -282,8 +323,7 @@ ...@@ -282,8 +323,7 @@
"abbreviation": "59", "abbreviation": "59",
"chamber": null "chamber": null
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 5
}, },
{ {
"fields": { "fields": {
...@@ -292,78 +332,84 @@ ...@@ -292,78 +332,84 @@
"abbreviation": "59-1", "abbreviation": "59-1",
"chamber": null "chamber": null
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 6
}, },
{ {
"fields": { "fields": {
"name": "Commission des lois constitutionnelles, de la l\u00e9gislation et de l'administration g\u00e9n\u00e9rale de la r\u00e9publique", "name": "Commission des lois constitutionnelles, de la l\u00e9gislation et de l'administration g\u00e9n\u00e9rale de la r\u00e9publique",
"kind": "committee", "kind": "committee",
"abbreviation": "Lois", "abbreviation": "Lois",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 7
}, },
{ {
"fields": { "fields": {
"name": "Bureau de l'assembl\u00e9e nationale", "name": "Bureau de l'assembl\u00e9e nationale",
"kind": "delegation", "kind": "delegation",
"abbreviation": "", "abbreviation": "",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 8
}, },
{ {
"fields": { "fields": {
"name": "D\u00e9l\u00e9gation charg\u00e9e de la communication et de la presse", "name": "D\u00e9l\u00e9gation charg\u00e9e de la communication et de la presse",
"kind": "delegation", "kind": "delegation",
"abbreviation": "", "abbreviation": "",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 9
}, },
{ {
"fields": { "fields": {
"name": "Groupe d'amiti\u00e9 france-mexique", "name": "Groupe d'amiti\u00e9 france-mexique",
"kind": "delegation", "kind": "delegation",
"abbreviation": "", "abbreviation": "",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 10
}, },
{ {
"fields": { "fields": {
"name": "Groupe d'amiti\u00e9 france-argentine", "name": "Groupe d'amiti\u00e9 france-argentine",
"kind": "delegation", "kind": "delegation",
"abbreviation": "", "abbreviation": "",
"chamber": 2 "chamber": [
"AN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 11
}, },
{ {
"fields": { "fields": {
"name": "S\u00e9nat", "name": "S\u00e9nat",
"kind": "chamber", "kind": "chamber",
"abbreviation": "SEN", "abbreviation": "SEN",
"chamber": 3 "chamber": [
"SEN"
]
}, },
"model": "representatives.group", "model": "representatives.group"
"pk": 12
}, },
{ {
"fields": { "fields": {
"name": "Socialiste et r\u00e9publicain", "name": "Socialiste et r\u00e9publicain",
"kind": "group", "kind": "group",
"abbreviation": "SOC", "abbreviation": "SOC",
"chamber": 3 "chamber": [
"SEN"
]
}, },