Ejemplo n.º 1
0
 def generate_test_users(n=1):
   """Returns a list of n test users
   """
   rv = list()
   for i in xrange(0, n):
     rv.append({'username': rand_string_gen(), 'password': rand_string_gen()})
   return rv
Ejemplo n.º 2
0
 def generate_test_cats(n=1):
   """Returns a list of n test cats
   """
   rv = list()
   # seed dates
   seed_start = date(year=1970, month=1, day=1)
   seed_end = date(year=1971, month=1, day=1)
   for i in xrange(0, n):
     birthdate = rand_date(seed_start, seed_end)
     rv.append({
       'name': rand_string_gen(),
       'birthdate': birthdate
     })
   return rv