コード例 #1
0
 def test_send_friend_invite_again(self):
     send_friend_invite(self.user, "other")
     self.assertEqual(
         self.user.outgoing_friendships.filter(
             to_user=self.other_user).count(), 1)
     send_friend_invite(self.user, "other")
     self.assertEqual(
         self.user.outgoing_friendships.filter(
             to_user=self.other_user).count(), 1)
コード例 #2
0
 def test_send_friend_invite_no_user(self):
     with self.assertRaises(RuntimeError):
         send_friend_invite(self.user, "missinguser")
コード例 #3
0
 def test_send_friend_invite_blocked(self):
     with self.assertRaises(RuntimeError):
         send_friend_invite(self.user, "other")