Ejemplo n.º 1
0
    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')
Ejemplo n.º 2
0
 def test_company_name(self):
     result = name.company_name()
     assert result + '\n' in get_dictionary('company_names')
Ejemplo n.º 3
0
 def test_top_level_domain(self):
     result = internet.top_level_domain()
     assert result + '\n' in get_dictionary('top_level_domains')
Ejemplo n.º 4
0
 def test_country(self):
     result = address.country()
     assert result + '\n' in get_dictionary('countries')
Ejemplo n.º 5
0
 def test_code(self):
     result = currency.code()
     assert result + '\n' in get_dictionary('currency_codes')
Ejemplo n.º 6
0
 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'))
Ejemplo n.º 7
0
 def test_state_abbrev(self):
     result = address.state_abbrev()
     assert result + '\n' in get_dictionary('state_abbrevs')
Ejemplo n.º 8
0
 def test_street_suffix(self):
     result = address.street_suffix()
     assert result + '\n' in get_dictionary('street_suffixes')
Ejemplo n.º 9
0
 def test_city(self):
     result = address.city()
     assert result + '\n' in get_dictionary('cities')
Ejemplo n.º 10
0
    def test_gender(self):
        result = personal.gender()
        assert result + '\n' in get_dictionary('genders')

        result = personal.abbreviated_gender()
        assert result in ('M', 'F')
Ejemplo n.º 11
0
 def test_street_name(self):
     result = address.street_name()
     assert result + '\n' in get_dictionary('street_names')
Ejemplo n.º 12
0
 def test_language(self):
     result = personal.language()
     assert result + '\n' in get_dictionary('languages')
Ejemplo n.º 13
0
 def test_race(self):
     result = personal.race()
     assert result + '\n' in get_dictionary('races')
Ejemplo n.º 14
0
 def test_shirt_size(self):
     result = personal.shirt_size()
     assert result + '\n' in get_dictionary('shirt_sizes')
Ejemplo n.º 15
0
 def test_title(self):
     result = name.title()
     assert result + '\n' in get_dictionary('name_titles')
Ejemplo n.º 16
0
 def test_state_abbrev(self):
     result = address.state_abbrev()
     assert result + '\n' in get_dictionary('state_abbrevs')
Ejemplo n.º 17
0
 def test_location(self):
     result = name.location()
     assert result + '\n' in get_dictionary('locations')
Ejemplo n.º 18
0
 def test_country(self):
     result = address.country()
     assert result + '\n' in get_dictionary('countries')
Ejemplo n.º 19
0
 def test_ccld(self):
     result = internet.cctld()
     assert result + "\n" in get_dictionary("country_code_top_level_domains")
Ejemplo n.º 20
0
 def test_continent(self):
     result = address.continent()
     assert result + '\n' in get_dictionary('continents')
Ejemplo n.º 21
0
 def test_province_abbrev(self):
     result = address.province_abbrev()
     self.assertTrue(result + '\n' in get_dictionary('province_abbrevs'))
Ejemplo n.º 22
0
 def test_frequency(self):
     result = basic.frequency()
     self.assertTrue(result + '\n' in get_dictionary('frequencies'))
Ejemplo n.º 23
0
 def test_continent(self):
     result = address.continent()
     assert result + '\n' in get_dictionary('continents')
Ejemplo n.º 24
0
 def test_color(self):
     result = basic.color()
     self.assertTrue(result + '\n' in get_dictionary('colors'))
Ejemplo n.º 25
0
 def test_description(self):
     result = currency.description()
     assert result + '\n' in get_dictionary('currency_descriptions')
Ejemplo n.º 26
0
 def test_description(self):
     result = currency.description()
     assert result + '\n' in get_dictionary('currency_descriptions')
Ejemplo n.º 27
0
 def test_ccld(self):
     result = internet.cctld()
     assert result + '\n'\
         in get_dictionary('country_code_top_level_domains')
Ejemplo n.º 28
0
 def test_code(self):
     result = currency.code()
     assert result + '\n' in get_dictionary('currency_codes')
Ejemplo n.º 29
0
 def test_last_name(self):
     result = name.last_name()
     assert result + '\n' in get_dictionary('last_names')
Ejemplo n.º 30
0
 def test_zone(self):
     zone = time.zone()
     self.assertTrue(zone + '\n' in get_dictionary('zones'))
Ejemplo n.º 31
0
 def test_job_title_suffix(self):
     result = name.job_title_suffix()
     assert result + '\n' in get_dictionary('job_title_suffixes')
Ejemplo n.º 32
0
 def test_street_name(self):
     result = address.street_name()
     assert result + '\n' in get_dictionary('street_names')
Ejemplo n.º 33
0
 def test_suffix(self):
     result = name.suffix()
     assert result + '\n' in get_dictionary('name_suffixes')
Ejemplo n.º 34
0
 def test_street_suffix(self):
     result = address.street_suffix()
     assert result + '\n' in get_dictionary('street_suffixes')
Ejemplo n.º 35
0
 def test_industry(self):
     result = name.industry()
     assert result + '\n' in get_dictionary('industries')
Ejemplo n.º 36
0
 def test_city(self):
     result = address.city()
     assert result + '\n' in get_dictionary('cities')
Ejemplo n.º 37
0
 def test_non_existent_test(self):
     with self.assertRaises(KeyError):
         get_dictionary('non_existent_file')
Ejemplo n.º 38
0
 def test_top_level_domain(self):
     result = internet.top_level_domain()
     assert result + "\n" in get_dictionary("top_level_domains")