Example #1
0
def initialise():
    admin_user = create_user_in_db("admin", "password")
    member_user = create_user_in_db("member", "password")
    team = create_team_in_db("default_team")
    member_role = get_team_role_by_name("Member")
    admin_role = get_team_role_by_name("Admin")

    create_membership_in_db(team, member_user, member_role)
    create_membership_in_db(team, admin_user, admin_role)
 def setUp(self):
     upgrade(x_arg="data=true")
     self.mood_template = create_mood_template_in_db("test_template")
     self.mood1 = create_mood_in_db("mood1", "#ffffff", self.mood_template)
     self.mood2 = create_mood_in_db("mood2", "#aaaaaa", self.mood_template)
     self.test_team1 = create_team_in_db("test_team_name")
     self.test_team2 = create_team_in_db("test_team_name2")
     self.test_user1 = create_user_in_db("*****@*****.**", "password")
     self.test_user2 = create_user_in_db("*****@*****.**", "password")
     self.member_role = get_team_role_by_name("Member")
     self.test_team_member_1 = create_membership_in_db(
         self.test_team1, self.test_user1, self.member_role)
     self.test_team_member_2 = create_membership_in_db(
         self.test_team1, self.test_user2, self.member_role)
     access_token = create_access_token(identity=self.test_user1.id)
     self.headers = {"Authorization": "Bearer {}".format(access_token)}
Example #3
0
 def setUp(self):
     upgrade(x_arg="data=true")
     self.mood_template = create_mood_template_in_db("test_template")
     self.mood1 = create_mood_in_db("mood1", "#ffffff", self.mood_template)
     self.mood2 = create_mood_in_db("mood2", "#aaaaaa", self.mood_template)
     self.user = create_user_in_db("*****@*****.**", "password")
     access_token = create_access_token(identity=self.user.id)
     self.headers = {"Authorization": "Bearer {}".format(access_token)}
 def setUp(self):
     upgrade(x_arg='data=true')
     self.user = create_user_in_db("*****@*****.**", "password")
     access_token = create_access_token(identity=self.user.id)
     self.headers = {'Authorization': 'Bearer {}'.format(access_token)}
Example #5
0
 def setUp(self):
     upgrade(x_arg='data=true')
     self.user = create_user_in_db("*****@*****.**", "password")