def test_get_voucher(self): username = '******' voucher = Radcheck.objects.create(user=None, username=username, attribute='MD5-Password', op=':=', value=md5_password('12345')) self.assertTrue(isinstance(rules.get_voucher(username), Radcheck)) voucher.delete()
def test_get_voucher_None(self): self.assertEqual(rules.get_voucher('bbbb'), None)