X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8d1372958ce4a205f11fcdd44cf6e9cac8429a69..ae60b2a3949e96357477cc04f90fd0873cee8a92:/apps/funding/tests.py?ds=inline diff --git a/apps/funding/tests.py b/apps/funding/tests.py deleted file mode 100644 index c9438a878..000000000 --- a/apps/funding/tests.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. -# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. -# -from django.test import TestCase -from .models import Offer, Perk, Funding - - -class FundTest(TestCase): - def setUp(self): - self.offer1 = Offer.objects.create( - author='author1', title='title1', slug='slug1', - target=100, start='2013-03-01', end='2013-03-31') - - def test_perks(self): - perk = Perk.objects.create(price=20, name='Perk 20') - perk1 = Perk.objects.create(offer=self.offer1, price=50, name='Perk 50') - offer2 = Offer.objects.create( - author='author2', title='title2', slug='slug2', - target=100, start='2013-02-01', end='2013-02-20') - perk2 = Perk.objects.create(offer=offer2, price=1, name='Perk 1') - - self.assertEqual( - set(self.offer1.fund('Tester', 'test@example.com', 10).perks.all()), - set()) - self.assertEqual( - set(self.offer1.fund('Tester', 'test@example.com', 70).perks.all()), - set([perk, perk1]))