コード例 #1
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
    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
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 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
ファイル: test_address.py プロジェクト: linmm24/flasky
 def test_country(self):
     result = address.country()
     assert result + '\n' in get_dictionary('countries')
コード例 #5
0
ファイル: test_currency.py プロジェクト: linmm24/flasky
 def test_code(self):
     result = currency.code()
     assert result + '\n' in get_dictionary('currency_codes')
コード例 #6
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 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
ファイル: test_address.py プロジェクト: linmm24/flasky
 def test_state_abbrev(self):
     result = address.state_abbrev()
     assert result + '\n' in get_dictionary('state_abbrevs')
コード例 #8
0
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 def test_street_suffix(self):
     result = address.street_suffix()
     assert result + '\n' in get_dictionary('street_suffixes')
コード例 #9
0
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 def test_city(self):
     result = address.city()
     assert result + '\n' in get_dictionary('cities')
コード例 #10
0
ファイル: test_personal.py プロジェクト: Boomatang/ForgeryPy
    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
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 def test_street_name(self):
     result = address.street_name()
     assert result + '\n' in get_dictionary('street_names')
コード例 #12
0
ファイル: test_personal.py プロジェクト: Boomatang/ForgeryPy
 def test_language(self):
     result = personal.language()
     assert result + '\n' in get_dictionary('languages')
コード例 #13
0
ファイル: test_personal.py プロジェクト: Boomatang/ForgeryPy
 def test_race(self):
     result = personal.race()
     assert result + '\n' in get_dictionary('races')
コード例 #14
0
ファイル: test_personal.py プロジェクト: Boomatang/ForgeryPy
 def test_shirt_size(self):
     result = personal.shirt_size()
     assert result + '\n' in get_dictionary('shirt_sizes')
コード例 #15
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 def test_title(self):
     result = name.title()
     assert result + '\n' in get_dictionary('name_titles')
コード例 #16
0
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 def test_state_abbrev(self):
     result = address.state_abbrev()
     assert result + '\n' in get_dictionary('state_abbrevs')
コード例 #17
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 def test_location(self):
     result = name.location()
     assert result + '\n' in get_dictionary('locations')
コード例 #18
0
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 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
ファイル: test_address.py プロジェクト: Boomatang/ForgeryPy
 def test_continent(self):
     result = address.continent()
     assert result + '\n' in get_dictionary('continents')
コード例 #21
0
ファイル: test_address.py プロジェクト: linmm24/flasky
 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
ファイル: test_address.py プロジェクト: linmm24/flasky
 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
ファイル: test_currency.py プロジェクト: linmm24/flasky
 def test_description(self):
     result = currency.description()
     assert result + '\n' in get_dictionary('currency_descriptions')
コード例 #26
0
ファイル: test_currency.py プロジェクト: Boomatang/ForgeryPy
 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
ファイル: test_currency.py プロジェクト: Boomatang/ForgeryPy
 def test_code(self):
     result = currency.code()
     assert result + '\n' in get_dictionary('currency_codes')
コード例 #29
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 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
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 def test_job_title_suffix(self):
     result = name.job_title_suffix()
     assert result + '\n' in get_dictionary('job_title_suffixes')
コード例 #32
0
ファイル: test_address.py プロジェクト: linmm24/flasky
 def test_street_name(self):
     result = address.street_name()
     assert result + '\n' in get_dictionary('street_names')
コード例 #33
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 def test_suffix(self):
     result = name.suffix()
     assert result + '\n' in get_dictionary('name_suffixes')
コード例 #34
0
ファイル: test_address.py プロジェクト: linmm24/flasky
 def test_street_suffix(self):
     result = address.street_suffix()
     assert result + '\n' in get_dictionary('street_suffixes')
コード例 #35
0
ファイル: test_name.py プロジェクト: pilosus/ForgeryPy
 def test_industry(self):
     result = name.industry()
     assert result + '\n' in get_dictionary('industries')
コード例 #36
0
ファイル: test_address.py プロジェクト: linmm24/flasky
 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")