fixing tests

This commit is contained in:
lucasmbrown-usds 2022-09-08 21:13:13 -04:00
parent f6dab0d260
commit 427da8cfda
6 changed files with 8 additions and 6 deletions

View file

@ -23,6 +23,7 @@ class ChildOpportunityIndex(ExtractTransformLoad):
""" """
# Metadata for the baseclass # Metadata for the baseclass
NAME = "child_opportunity_index"
GEO_LEVEL = ValidGeoLevel.CENSUS_TRACT GEO_LEVEL = ValidGeoLevel.CENSUS_TRACT
# Define these for easy code completion # Define these for easy code completion

View file

@ -59,7 +59,7 @@ class TestChildOpportunityIndexETL(TestETL):
def test_get_output_file_path(self, mock_etl, mock_paths): def test_get_output_file_path(self, mock_etl, mock_paths):
"""Tests the right file name is returned.""" """Tests the right file name is returned."""
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
data_path, tmp_path = mock_paths data_path, tmp_path = mock_paths
output_file_path = etl._get_output_file_path() output_file_path = etl._get_output_file_path()

View file

@ -51,7 +51,7 @@ class TestDOEEnergyBurdenETL(TestETL):
def test_get_output_file_path(self, mock_etl, mock_paths): def test_get_output_file_path(self, mock_etl, mock_paths):
"""Tests the right file name is returned.""" """Tests the right file name is returned."""
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
data_path, tmp_path = mock_paths data_path, tmp_path = mock_paths
output_file_path = etl._get_output_file_path() output_file_path = etl._get_output_file_path()

View file

@ -65,7 +65,7 @@ class TestAbandondedLandMineETL(TestETL):
initiliazed correctly. initiliazed correctly.
""" """
# setup # setup
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
# validation # validation
assert etl.GEOID_FIELD_NAME == "GEOID10" assert etl.GEOID_FIELD_NAME == "GEOID10"
assert etl.GEOID_TRACT_FIELD_NAME == "GEOID10_TRACT" assert etl.GEOID_TRACT_FIELD_NAME == "GEOID10_TRACT"
@ -78,7 +78,7 @@ class TestAbandondedLandMineETL(TestETL):
def test_get_output_file_path(self, mock_etl, mock_paths): def test_get_output_file_path(self, mock_etl, mock_paths):
"""Tests the right file name is returned.""" """Tests the right file name is returned."""
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
data_path, tmp_path = mock_paths data_path, tmp_path = mock_paths
output_file_path = etl._get_output_file_path() output_file_path = etl._get_output_file_path()

View file

@ -101,6 +101,7 @@ class TestETL:
if x not in states_expected_from_fixtures if x not in states_expected_from_fixtures
] ]
etl_class.PUERTO_RICO_EXPECTED_IN_DATA = False etl_class.PUERTO_RICO_EXPECTED_IN_DATA = False
etl_class.ISLAND_AREAS_EXPECTED_IN_DATA = False
return etl_class return etl_class

View file

@ -98,7 +98,7 @@ class TestUSArmyFUDSETL(TestETL):
- self.OUTPUT_PATH points to the correct path in the temp directory - self.OUTPUT_PATH points to the correct path in the temp directory
""" """
# setup # setup
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
# validation # validation
assert etl.GEOID_FIELD_NAME == "GEOID10" assert etl.GEOID_FIELD_NAME == "GEOID10"
assert etl.GEOID_TRACT_FIELD_NAME == "GEOID10_TRACT" assert etl.GEOID_TRACT_FIELD_NAME == "GEOID10_TRACT"
@ -113,7 +113,7 @@ class TestUSArmyFUDSETL(TestETL):
def test_get_output_file_path(self, mock_etl, mock_paths): def test_get_output_file_path(self, mock_etl, mock_paths):
"""Tests the right file name is returned.""" """Tests the right file name is returned."""
etl = self._ETL_CLASS() etl = self._get_instance_of_etl_class()
data_path, tmp_path = mock_paths data_path, tmp_path = mock_paths
output_file_path = etl._get_output_file_path() output_file_path = etl._get_output_file_path()