Skip to content
Extraits de code Groupes Projets
Valider 8c194430 rédigé par Nicolas Joyard's avatar Nicolas Joyard
Parcourir les fichiers

Fix test errors

parent 98a0fae0
Branches
Étiquettes
Aucune requête de fusion associée trouvée
......@@ -3,7 +3,6 @@
import csv
import django
from django.apps import apps
from django.db import transaction
import logging
import sys
import re
......@@ -106,4 +105,3 @@ def main(stream=None):
imported = imported + 1
logger.info('%d rows imported, %d rows rejected', imported, len(rejected))
......@@ -2,9 +2,9 @@ from django.db import models
from django.core.urlresolvers import reverse
from django.template.defaultfilters import truncatewords
from taggit.managers import TaggableManager
from representatives.models import Representative
class Position(models.Model):
representative = models.ForeignKey(Representative,
related_name='positions')
......
# coding: utf-8
# flake8: noqa
dossier_mappings = {
"Resolution on Anti-Counterfeiting Trade Agreement (ACTA)":
"Resolution on the Anti-Counterfeiting Trade Agreement (ACTA)",
"Rapport Bono on cultural industries in Europe":
"Cultural industries in Europe",
"Rapport Gallo on enforcement of intellectual property rights in the internal market":
"Enforcement of intellectual property rights in the internal market",
"Rapport Lambrinidis on strengthening security and fundamental freedoms on the Internet":
"Strengthening security and fundamental freedoms on the Internet",
"Criminal measures aimed at ensuring the enforcement of intellectual property rights (IPRED 2), 1st reading":
"Criminal measures aimed at ensuring the enforcement of intellectual property rights"
}
......@@ -3,27 +3,15 @@
import csv
import django
from django.apps import apps
from django.db import transaction
import logging
import sys
from representatives_recommendations.models import Recommendation
from representatives_votes.models import Dossier, Proposal
logger = logging.getLogger(__name__)
from .dossier_mappings import dossier_mappings
dossier_mappings = {
"Resolution on Anti-Counterfeiting Trade Agreement (ACTA)":
"Resolution on the Anti-Counterfeiting Trade Agreement (ACTA)",
"Rapport Bono on cultural industries in Europe":
"Cultural industries in Europe",
"Rapport Gallo on enforcement of intellectual property rights in the internal market":
"Enforcement of intellectual property rights in the internal market",
"Rapport Lambrinidis on strengthening security and fundamental freedoms on the Internet":
"Strengthening security and fundamental freedoms on the Internet",
"Criminal measures aimed at ensuring the enforcement of intellectual property rights (IPRED 2), 1st reading":
"Criminal measures aimed at ensuring the enforcement of intellectual property rights"
}
logger = logging.getLogger(__name__)
class RecommendationImporter:
......@@ -124,4 +112,3 @@ def main(stream=None):
imported = imported + 1
logger.info('%d rows imported, %d rows rejected', imported, len(rejected))
......@@ -44,8 +44,8 @@ setup(name='political-memory',
},
entry_points={
'console_scripts': [
'memopol_import_positions = representatives_positions.contrib.import_positions:main',
'memopol_import_recommendations = representatives_recommendations.contrib.import_recommendations:main',
'memopol_import_positions = representatives_positions.contrib.import_positions:main', # noqa
'memopol_import_recommendations = representatives_recommendations.contrib.import_recommendations:main', # noqa
]
}
)
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter