예제 #1
0
파일: tests.py 프로젝트: point97/madrona
 def test_group_request(self):
     """ 
     Tests that user can request membership with a group
     """
     user1 = User.objects.create_user('user1',
                                      '*****@*****.**',
                                      password='******')
     group1 = Group.objects.create(name="Test Group 1")
     gr = GroupRequest(user=user1, group=group1)
     gr.save()
     gr1 = GroupRequest.objects.all()
     self.assertEqual(len(gr1), 1)
     self.assertEqual(gr1[0].user, user1)