def aulas_fake(last_id, test_mode=False, count=5): fake = Faker('pt_BR') if test_mode: EducatProvider.FRONTEND_PATH = '../../frontend/src/' fake.add_provider(EducatProvider) curso = fake.curso() curso['professor'] = fake.professor() lista = [] today = datetime.today() while len(lista) < count: last_id += 1 lista.append({ 'dia': today.strftime('%Y-%m-%d'), 'aluno': fake.aluno(), 'id': last_id }) return { 'curso': curso, 'lista': lista, }