Skip to content

Commit

Permalink
Actualizo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lrromero committed Aug 8, 2018
1 parent 0b7015f commit 4085c4d
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions tests/test_indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def test_format_indicators(self):
'distribuciones_formatos_cant': {
'CSV': 1,
'XLSX': 1,
'PDF': 1
'PDF': 1,
'None': 3
}
}

Expand All @@ -113,6 +114,7 @@ def test_license_indicators(self):
'datasets_licencias_cant': {
'Open Data Commons Open Database License 1.0': 1,
'Creative Commons Attribution': 1,
'None': 1
}
}

Expand All @@ -124,7 +126,7 @@ def test_no_licenses_indicators(self):
# No tienen licencias
catalog = os.path.join(self.SAMPLES_DIR, "several_datasets_for_harvest.json")
indicators = self.dj.generate_catalogs_indicators(catalog)[0][0]
assert_equal(indicators['datasets_licencias_cant'], {})
assert_equal(indicators['datasets_licencias_cant'], {'None': 3})

@my_vcr.use_cassette()
def test_field_indicators_on_min_catalog(self):
Expand Down Expand Up @@ -262,14 +264,17 @@ def test_network_indicators(self):
'distribuciones_formatos_cant': {
'CSV': 2,
'XLSX': 1,
'PDF': 2
'PDF': 2,
'None': 3
},
'distribuciones_tipos_cant': {
'file': 1,
'documentation': 1
'documentation': 1,
'None': 6
},
'datasets_licencias_cant': {
'Open Data Commons Open Database License 1.0': 2,
'None': 3
},
'campos_optativos_pct': 32.56,
'campos_recomendados_pct': 50.72,
Expand All @@ -296,6 +301,7 @@ def test_network_license_indicators(self):
'datasets_licencias_cant': {
'Open Data Commons Open Database License 1.0': 3,
'Creative Commons Attribution': 1,
'None': 1
},
}

Expand All @@ -320,10 +326,11 @@ def test_network_type_indicators(self):
'catalogos_cant': 2,
'distribuciones_cant': 8,
'distribuciones_tipos_cant': {
"file": 2,
"file.upload": 1,
"documentation": 2,
"api": 2
'file': 2,
'file.upload': 1,
'documentation': 2,
'api': 2,
'None': 1,
}
}

Expand All @@ -338,10 +345,11 @@ def test_types_indicators(self):

expected = {
'distribuciones_tipos_cant': {
"file": 1,
"file.upload": 1,
"documentation": 1,
"api": 2
'file': 1,
'file.upload': 1,
'documentation': 1,
'api': 2,
'None': 1
}
}

Expand Down

0 comments on commit 4085c4d

Please sign in to comment.