def build_currency(currency_pool=currency_pool): letter = rand_char(currency_pool) currency = models.Currency( name='currency%s' % letter, description=rand_string(200), decimal_places=random.randint(0,3) ) currency.save() currencies.append(currency) return currency
def build_users(): letter = rand_char(user_pool) username = '******' % letter user = models.User.objects.create_user( username, '*****@*****.**' % username, password='******' ) user.save() users.append(user) return user