示例#1
0
def job_seeker_criteria(de_dict):
    """Extract a limited set of criteria for a job seeker.

    Args:
        de_dict: the dict directly pulled from FHS about a job seeker.

    Returns:
        a tuple with the list of criteria for the job seeker.
    """

    salary_low, salary_high = bucketize_salary(de_dict)
    return (de_dict[fhs.JOB_GROUP_ID_FIELD],
            fhs.extract_departement_id(de_dict[fhs.CITY_ID_FIELD]),
            de_dict[fhs.SALARY_UNIT_FIELD], salary_low, salary_high)
示例#2
0
    def test_extract_departement_id_oversee(self):
        """Test extract_departement_id on an oversee locality."""

        departement_id = fhs.extract_departement_id('97613')
        self.assertEqual('976', departement_id)
示例#3
0
    def test_extract_departement_id(self):
        """Basic usage of extract_departement_id."""

        departement_id = fhs.extract_departement_id('31555')
        self.assertEqual('31', departement_id)