From 7c27133ba32f0dcbc24aa90a21ddfbadda0b5b51 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Mon, 11 Dec 2017 11:21:34 +0100 Subject: [PATCH] unit test for voucher type to string methods --- smash/web/tests/models/test_voucher_type.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 smash/web/tests/models/test_voucher_type.py diff --git a/smash/web/tests/models/test_voucher_type.py b/smash/web/tests/models/test_voucher_type.py new file mode 100644 index 00000000..3c47e30b --- /dev/null +++ b/smash/web/tests/models/test_voucher_type.py @@ -0,0 +1,15 @@ +import logging + +from django.test import TestCase + +from web.tests.functions import create_voucher_type + +logger = logging.getLogger(__name__) + + +class VoucherTypeTests(TestCase): + def test_to_string(self): + voucher_type = create_voucher_type() + + self.assertTrue(voucher_type.code in str(voucher_type)) + self.assertTrue(voucher_type.code in unicode(voucher_type)) -- GitLab