Пример #1
0
 def test_approve(self):
     """Test approving a join request"""
     join_request = JoinRequest(user=self.systers_user,
                                community=self.community)
     self.assertFalse(join_request.is_approved)
     join_request.approve()
     self.assertTrue(join_request.is_approved)
     join_request.approve()
     self.assertTrue(join_request.is_approved)
Пример #2
0
 def test_unicode(self):
     """Test JoinRequest object string representation"""
     join_request = JoinRequest(user=self.systers_user,
                                community=self.community)
     self.assertEqual(str(join_request),
                      "Join Request by foo - not approved")
     join_request.is_approved = True
     join_request.save()
     self.assertEqual(str(join_request), "Join Request by foo - approved")
Пример #3
0
 def test_unicode(self):
     """Test JoinRequest object string representation"""
     join_request = JoinRequest(user=self.systers_user,
                                community=self.community)
     self.assertEqual(str(join_request),
                      "Join Request by foo - not approved")
     join_request.is_approved = True
     join_request.save()
     self.assertEqual(str(join_request),
                      "Join Request by foo - approved")
Пример #4
0
 def test_approve(self):
     """Test approving a join request"""
     join_request = JoinRequest(user=self.systers_user,
                                community=self.community)
     self.assertFalse(join_request.is_approved)
     join_request.approve()
     self.assertTrue(join_request.is_approved)
     join_request.approve()
     self.assertTrue(join_request.is_approved)