示例#1
0
def test_model_methods(second_user):
    admin_group = PortalGroup(name="Admins", can_admin=True)
    admin_group.save()
    admin_group.members.add(second_user)
    assert admin_group.has_member(second_user) is True
示例#2
0
 def test_model_methods(self):
     admin_group = PortalGroup(name="Admins", can_admin=True)
     admin_group.save()
     admin_group.members.add(self.second_user)
     self.assertEqual(admin_group.has_member(self.second_user), True)