def test_employment_type_missing(self): parser = Parser() parser.parse(read_test_case('schemaorg-rdfa-employment-type-missing.html')) assert parser.get_result('has-employment-type')['result'] == False
def test_location_missing(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld-location-missing.html')) assert parser.job_advert.address == None assert parser.get_result('location-clarity')['result'] == 'missing'
def test_employment_type(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld.html')) assert parser.job_advert.employment_type == 'Full-time' assert parser.get_result('has-employment-type')['result'] == True
def test_location_unclear(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld.html')) assert parser.job_advert.address == 'Kirkland, WA' assert parser.get_result('location-clarity')['result'] == 'unclear'
def test_location_clear(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld-location-clear.html')) assert parser.job_advert.address == 'Somerset House, Strand, London WC2R 1LA, London' assert parser.get_result('location-clarity')['result'] == 'clear'
def test_salary_unclear(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld-salary-unclear.html')) assert parser.get_result('salary-clarity')['result'] == 'unclear'
def test_salary_missing(self): parser = Parser() parser.parse(read_test_case('schemaorg-jsonld-salary-missing.html')) assert parser.get_result('salary-clarity')['result'] == 'missing'
def test_parser(self): parser = Parser() parser.parse(read_test_case('schemaorg-microdata.html')) assert parser.get_result('flesch-reading-ease')['result']
def test_feminine(self): parser = Parser() parser.parse(read_test_case('schemaorg-microdata-gender-coding-feminine.html')) assert 'feminine' in parser.get_result('gender-coded-language')['result']
def test_neutral(self): parser = Parser() parser.parse(read_test_case('schemaorg-microdata-gender-coding-neutral.html')) assert parser.get_result('gender-coded-language')['result'] == 'neutral'
def test_check_creative_commons_licence_link(self): parser = Parser() parser.parse(read_test_case('licence-link.html')) assert parser.job_advert.creative_commons_licences == [{'name': 'Creative Commons Attribution', 'url': 'http://creativecommons.org/licenses/by-nd/4.0'}] assert parser.get_result('creative-commons-licence')['result'] == True
def test_salary_clear(self): parser = Parser() parser.parse(read_test_case('schemaorg-microdata-salary-clear.html')) assert parser.get_result('salary-clarity')['result'] == 'clear'