Commit d6e2709a authored by Pierre Dittgen's avatar Pierre Dittgen

Add test encoding unit tests

parent 284b0670
Pipeline #2487 passed with stage
in 1 minute and 43 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
n_amenageur;n_operateur;n_enseigne;id_station;n_station;ad_station;code_insee;Xlongitude;Ylatitude;nbre_pdc;id_pdc;puiss_max;type_prise;acces_recharge;accessibilité;observations;date_maj
XXX;YYY;ZZZ;FR*A17*P*ZZZ*3*_*_*_;Parking 1;D109A;06090;6.92641;43.59413;2;FR*A17*E*ZZZ*3*1*1*_;22.0;T2 - E/F;Payant (badge, appli et QR code);24h/24;RAS;2018/03/31
XXX;YYY;ZZZ;FR*A17*P*ZZZ*3*_*_*_;Parking 1;D109A;06090;6.92641;43.59413;2;FR*A17*E*ZZZ*3*1*2*_;22.0;T2 - E/F;Payant (badge, appli et QR code);24h/24;RAS;2018/3/31
from validata_core.helpers import ValidataResource
def test_detect_utf_8():
b_content = open("tests/fixtures/irve_accent_valide.csv", "rb").read()
assert ValidataResource.detect_encoding(b_content) == 'utf-8'
def test_detect_iso8859_1():
b_content = open("tests/fixtures/irve-driveco-201215.csv", "rb").read()
assert ValidataResource.detect_encoding(b_content) == 'iso-8859-1'
\ No newline at end of file
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