#NEWLINE# def test_random_name( self ) : #NEWLINE# #INDENT# 'Test random_name random database name generator.' #NEWLINE# basename = 'Fred' #NEWLINE# rnd_name1 = dbutil . random_name ( basename ) #NEWLINE# rnd_name2 = dbutil . random_name ( basename ) #NEWLINE# self . assertRegexpMatches ( rnd_name1 , '^Fred_[\\d]{9}' , ( "Random name has unexpected format '%s'" % self ) ) #NEWLINE# self . assertRegexpMatches ( rnd_name2 , '^Fred_[\\d]{9}' , ( "Random name has unexpected format '%s'" % rnd_name2 ) ) #NEWLINE# self . assertNotEqual ( rnd_name1 , rnd_name2 , ( "Random names are equal: '%s'" % rnd_name1 ) )