def test_can_download_report(self): """ User is part of group controlling perms """ grp = Group(name=settings.PAYMENT_REPORT_GENERATOR_GROUP) grp.save() self.user.groups.add(grp) self.assertTrue(_can_download_report(self.user))
def test_can_download_report_no_group(self): """ Group controlling perms is not present """ self.assertFalse(_can_download_report(self.user))
def test_can_download_report_not_member(self): """ User is not part of group controlling perms """ Group(name=settings.PAYMENT_REPORT_GENERATOR_GROUP).save() self.assertFalse(_can_download_report(self.user))