File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -161,12 +161,13 @@ def parse_random_text_generator(configuration):
161161 "Illegal character set name, is not defined: {0}" .format (character_set ))
162162 characters = CHARACTER_SETS [character_set ]
163163 else : # Custom characters listing, not a character set
164- characters = str ( configuration .get ('characters' ) )
164+ characters = configuration .get ('characters' )
165165
166166 min_length = int (configuration .get ('min_length' , 8 ))
167167 max_length = int (configuration .get ('max_length' , 8 ))
168168 if not characters :
169169 return factory_generate_text (min_length = min_length , max_length = max_length )()
170+ characters = str (characters )
170171
171172 if configuration .get ('length' ):
172173 length = int (configuration .get ('length' ))
Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ def test_parse_text_generator(self):
205205 "Should never parse an invalid character_set successfully, but did!" )
206206 except ValueError :
207207 pass
208+ test_config = {'type' : 'random_text' }
209+ try :
210+ gen = generators .parse_generator (test_config )
211+ except Exception :
212+ self .fail ("Should never Raise an exception!" )
208213
209214 # Test for character set handling
210215 for charset in generators .CHARACTER_SETS :
You can’t perform that action at this time.
0 commit comments