You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

14 lines
474 B

from django.test import TestCase
from .models import HonoraryCertificate
# Create your tests here.
class TestGranted(TestCase):
def test_set_granted(self):
obj = HonoraryCertificate.objects.create(realname='hurzel',email='hurzel@web.de')
self.assertEqual(obj.granted,None)
print(obj.pk)
HonoraryCertificate.set_granted(obj.pk, True)
obj2 = HonoraryCertificate.objects.get(pk=obj.pk)
self.assertEqual(obj2.granted,True)