def create_test_testando(self): userprofile = UserProfile() userprofile.name("Teste Testando") userprofile.registration_number = "110030987" userprofile.category = 'Student' userprofile.user.username = "******" userprofile.user.email = "*****@*****.**" userprofile.user.set_password('123456') if(not self.check_registration_number(userprofile.registration_number)): userprofile.registration_number = "101030987" userprofile.save() userprofile.make_as_academic_staff() userprofile.save()
def create_fhc(self): userprofile = UserProfile() userprofile.name("Fernando Henrique Cardoso") userprofile.registration_number = "110030989" userprofile.category = 'Student' userprofile.user.username = "******" userprofile.user.email = "*****@*****.**" userprofile.user.set_password('123456') if(not self.check_registration_number(userprofile.registration_number)): userprofile.registration_number = "101030989" userprofile.save() userprofile.make_as_admin() userprofile.save()
def create_michel_temer(self): userprofile = UserProfile() userprofile.name("Michel Temer") userprofile.registration_number = "110030988" userprofile.category = 'Student' userprofile.user.username = "******" userprofile.user.email = "*****@*****.**" userprofile.user.set_password('123456') if(not self.check_registration_number(userprofile.registration_number)): userprofile.registration_number = "101030988" userprofile.save() userprofile.make_as_academic_staff() userprofile.save()
def register_user(step, username, password, registration_number, category): user = UserProfile() user.user = User() user.registration_number = registration_number user.user.email = username user.user.username = username user.user.first_name = "Usuário" user.user.set_password(password) user.save() user.make_as_academic_staff() for number, category_type in CATEGORY: if category_type == category: user.category = number user.save()