Browse Source

first test

master
Benni Bärmann 2 years ago
parent
commit
b398b3a511
  1. 11
      input/tests.py

11
input/tests.py

@ -1,3 +1,14 @@
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)
Loading…
Cancel
Save