Example #1
0
 def setUp(self):
     self.user = create_test_user()
     self.joiner = create_test_user()
     self.group = create_test_group(user=self.user)
     self.rule = create_friends_test_rule(group=self.group)
     self.args['token'] = self.joiner.user_token.token
     self.args['group_id'] = self.group.id
Example #2
0
 def setUp(self):
     self.inviter = create_test_user()
     self.invitee = create_test_user()
     self.group = create_test_group(user=self.inviter)
     self.args['group_id'] = self.group.id
     self.args['token'] = self.inviter.user_token.token
     self.args['user_id'] = self.invitee.id
Example #3
0
 def setUp(self):
     self.date = datetime.utcnow()
     self.inviter = create_test_user()
     self.invitee = create_test_user()
     self.args['token'] = self.invitee.user_token.token
     self.args['date'] = str(self.date)
     self.group = create_test_group(user=self.inviter)
     self.invite = create_test_invite(inviter=self.inviter, invitee=self.invitee, group=self.group)
Example #4
0
 def setUp(self):
     self.user_deleting = create_test_user()
     self.user_recieving = create_test_user()
     self.group = create_test_group(user=self.user_deleting)
     self.group.subscriptions.append(self.user_recieving)
     self.post = create_test_post(group=self.group, user=self.user_deleting)
     self.comment = create_test_comment(post=self.post, user=self.user_deleting)
     self.args['date'] = str(datetime.utcnow())
     self.args['token'] = self.user_recieving.user_token.token
Example #5
0
 def setUp(self):
     self.user = create_test_user()
     self.user2 = create_test_user()
     self.group = create_test_group(user=self.user)
     self.group.subscriptions.append(self.user2)
     self.post = create_test_post(user=self.user, group=self.group)
     self.group.active = False
     db.session.commit()
     self.args['token'] = self.user2.user_token.token
     self.args['page'] = 1
     self.args['limit'] = 100000
Example #6
0
 def setUp(self):
     self.user = create_test_user()
     self.group = create_test_group(user=self.user)
     self.group2 = create_test_group(user=self.user)
     self.post = create_test_anon_post(group=self.group, user=self.user)
     self.user2 = create_test_user()
     self.group.subscriptions.append(self.user2)
     db.session.commit()
     self.post2 = create_test_anon_post(group=self.group, user=self.user2)
     self.args['token'] = self.user.user_token.token
     self.args['page'] = 1
     self.args['limit'] = 50
Example #7
0
 def setUp(self):
     self.user = create_test_user()
     self.user2 = create_test_user()
     self.group = create_test_group(user=self.user)
     self.group.subscriptions.append(self.user2)
     self.post = create_test_post(user=self.user, group=self.group)
     # hot = create_test_hot(post=self.post, user=self.user)
     db.session.commit()
     self.args['token'] = self.user2.user_token.token
     self.args['user_id'] = self.user.id
     self.args['page'] = 1
     self.args['limit'] = 100000
Example #8
0
 def setUp(self):
     self.user = create_test_user()
     self.user2 = create_test_user()
     self.group = create_test_group(user=self.user)
     self.group.subscriptions.append(self.user2)
     self.post = create_test_post(user=self.user, group=self.group)
     self.post3 = create_test_post(user=self.user, group=self.group)
     self.hot = create_test_hot(user=self.user2, post=self.post)
     self.group2 = create_test_group(user=self.user)
     self.post4 = create_test_post(user=self.user, group=self.group2)
     self.post2 = create_test_post(user=self.user, group=self.group2)
     self.args['token'] = self.user2.user_token.token
     self.args['page'] = 1
     self.args['limit'] = 100000
Example #9
0
	def setUp(self):
		self.user = create_test_user()
		self.group = create_test_group(user=self.user)
		self.post = create_test_post(user=self.user, group=self.group)
		self.comment = create_test_comment(user=self.user, post=self.post)
		self.args['token'] = self.user.user_token.token
		self.args['comment_id'] = self.comment.id
Example #10
0
	def setUp(self):
		self.user = create_test_user()
		self.group = create_test_group(user=self.user)
		self.post = create_test_post(user=self.user, group=self.group)
		self.args['token'] = self.user.user_token.token
		self.args['post_id'] = self.post.id
		self.args['content'] = 'content'
Example #11
0
 def setUp(self):
     self.user = create_test_user()
     self.group = create_test_group(user=self.user)
     self.post = create_test_post(group=self.group, user=self.user)
     self.args['token'] = self.user.user_token.token
     self.args['id'] = self.post.id
     self.args['type'] = 'comment'
     self.args['reason'] = 'reason'
Example #12
0
 def setUp(self):
     self.user = create_test_user()
     self.group = create_test_group(user=self.user)
     self.args['token'] = self.user.user_token.token
     self.args['property'] = "friends"
     self.args['value'] = 300
     self.args['value_type'] = "int"
     self.args['operand'] = RuleOperands.OPERAND_BIGGER_THAN
     self.args['group_id'] = self.group.id
     self.args['name'] = 'Friends bigger than 300'
Example #13
0
 def setUp(self):
     self.user = create_test_user()
     self.args['token'] = self.user.user_token.token
     self.args['nickname'] = 'rafa'
     self.args['gender'] = 'female'
Example #14
0
 def setUp(self):
     self.user = create_test_user()
     self.group = create_test_group(user=self.user)
     self.args['token'] = self.user.user_token.token
Example #15
0
 def setUp(self):
     self.user = create_test_user()
     self.args['token'] = self.user.user_token.token
     self.args['search'] = 'rafael'
Example #16
0
 def setUp(self):
     self.user = create_test_user()
     self.group = create_test_group(user=self.user)
     self.post = create_test_post(group=self.group, user=self.user)
     self.hot = create_test_hot(post=self.post,user=self.user)