def create_user(self, name='samplename', email='*****@*****.**', is_active=True): user = User() user.username = name user.email = email user.is_active = is_active user.save()
def setUp(self): user = User() user.username = "******" user.set_password("123colab4") user.email = "*****@*****.**" user.id = 1 user.twitter = "usertestcolab" user.facebook = "usertestcolab" user.first_name = "USERtestCoLaB" user.last_name = "COLAB" user.save()
def create_user(self): user = User() user.username = "******" user.set_password("123colab4") user.email = "*****@*****.**" user.id = 1 user.first_name = "USERtestCoLaB" user.last_name = "COLAB" user.save() return user
def create_user(context, username, password, status): user = User() user.username = username user.set_password(password) user.email = "*****@*****.**" user.id = 1 user.first_name = "USERtestCoLaB" user.last_name = "COLAB" user.needs_update = False if status == "active": user.is_active = True else: user.is_active = False user.save()