source: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_payment.py @ 7117

Last change on this file since 7117 was 6875, checked in by Henrik Bettermann, 13 years ago

Add StudentOnlinePayment? class (including factory) which also implements IStudentNavigation.

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
2## This program is free software; you can redistribute it and/or modify
3## it under the terms of the GNU General Public License as published by
4## the Free Software Foundation; either version 2 of the License, or
5## (at your option) any later version.
6##
7## This program is distributed in the hope that it will be useful,
8## but WITHOUT ANY WARRANTY; without even the implied warranty of
9## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10## GNU General Public License for more details.
11##
12## You should have received a copy of the GNU General Public License
13## along with this program; if not, write to the Free Software
14## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15##
16"""Tests for student payments.
17
18"""
19
20from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
21from waeup.sirp.students.payments import (
22    StudentOnlinePayment, StudentOnlinePaymentFactory)
23from waeup.sirp.payments.interfaces import IOnlinePayment
24from waeup.sirp.students.interfaces import IStudentNavigation
25
26class StudentOnlinePaymentFactoryTest(FunctionalTestCase):
27
28    layer = FunctionalLayer
29
30    def setUp(self):
31        super(StudentOnlinePaymentFactoryTest, self).setUp()
32        self.factory = StudentOnlinePaymentFactory()
33        return
34
35    def tearDown(self):
36        super(StudentOnlinePaymentFactoryTest, self).tearDown()
37        return
38
39    def test_factory(self):
40        obj = self.factory()
41        assert isinstance(obj, StudentOnlinePayment)
42
43    def test_getInterfaces(self):
44        implemented_by = self.factory.getInterfaces()
45        assert implemented_by.isOrExtends(IOnlinePayment)
46        assert implemented_by.isOrExtends(IStudentNavigation)
Note: See TracBrowser for help on using the repository browser.