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