def test_first_name(self): result = name.first_name() assert result + '\n' in get_dictionary('male_first_names') or\ result + '\n' in get_dictionary('female_first_names') result = name.male_first_name() assert result + '\n' in get_dictionary('male_first_names') result = name.female_first_name() assert result + '\n' in get_dictionary('female_first_names')
def test_company_name(self): result = name.company_name() assert result + '\n' in get_dictionary('company_names')
def test_top_level_domain(self): result = internet.top_level_domain() assert result + '\n' in get_dictionary('top_level_domains')
def test_country(self): result = address.country() assert result + '\n' in get_dictionary('countries')
def test_code(self): result = currency.code() assert result + '\n' in get_dictionary('currency_codes')
def test_job_title(self): job_title = name.job_title() titles = "|".join( [i.strip() for i in get_dictionary('job_title_suffixes')]) if not re.search(r'\s({0})$'.format(titles), job_title): self.assertIn(job_title + '\n', get_dictionary('job_titles'))
def test_state_abbrev(self): result = address.state_abbrev() assert result + '\n' in get_dictionary('state_abbrevs')
def test_street_suffix(self): result = address.street_suffix() assert result + '\n' in get_dictionary('street_suffixes')
def test_city(self): result = address.city() assert result + '\n' in get_dictionary('cities')
def test_gender(self): result = personal.gender() assert result + '\n' in get_dictionary('genders') result = personal.abbreviated_gender() assert result in ('M', 'F')
def test_street_name(self): result = address.street_name() assert result + '\n' in get_dictionary('street_names')
def test_language(self): result = personal.language() assert result + '\n' in get_dictionary('languages')
def test_race(self): result = personal.race() assert result + '\n' in get_dictionary('races')
def test_shirt_size(self): result = personal.shirt_size() assert result + '\n' in get_dictionary('shirt_sizes')
def test_title(self): result = name.title() assert result + '\n' in get_dictionary('name_titles')
def test_location(self): result = name.location() assert result + '\n' in get_dictionary('locations')
def test_ccld(self): result = internet.cctld() assert result + "\n" in get_dictionary("country_code_top_level_domains")
def test_continent(self): result = address.continent() assert result + '\n' in get_dictionary('continents')
def test_province_abbrev(self): result = address.province_abbrev() self.assertTrue(result + '\n' in get_dictionary('province_abbrevs'))
def test_frequency(self): result = basic.frequency() self.assertTrue(result + '\n' in get_dictionary('frequencies'))
def test_color(self): result = basic.color() self.assertTrue(result + '\n' in get_dictionary('colors'))
def test_description(self): result = currency.description() assert result + '\n' in get_dictionary('currency_descriptions')
def test_ccld(self): result = internet.cctld() assert result + '\n'\ in get_dictionary('country_code_top_level_domains')
def test_last_name(self): result = name.last_name() assert result + '\n' in get_dictionary('last_names')
def test_zone(self): zone = time.zone() self.assertTrue(zone + '\n' in get_dictionary('zones'))
def test_job_title_suffix(self): result = name.job_title_suffix() assert result + '\n' in get_dictionary('job_title_suffixes')
def test_suffix(self): result = name.suffix() assert result + '\n' in get_dictionary('name_suffixes')
def test_industry(self): result = name.industry() assert result + '\n' in get_dictionary('industries')
def test_non_existent_test(self): with self.assertRaises(KeyError): get_dictionary('non_existent_file')
def test_top_level_domain(self): result = internet.top_level_domain() assert result + "\n" in get_dictionary("top_level_domains")