From b398b3a511fb53f90e14ce5f16ba50a1591367eb Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Mon, 23 Nov 2020 14:08:01 +0100 Subject: [PATCH] first test --- input/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/input/tests.py b/input/tests.py index 7ce503c..ff6dd91 100644 --- a/input/tests.py +++ b/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)