source: main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_container.py @ 16512

Last change on this file since 16512 was 12752, checked in by Henrik Bettermann, 10 years ago

propset

  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1## $Id: test_container.py 12752 2015-03-12 10:19:49Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18"""
19Test the payments/container module.
20"""
21from zope.interface.verify import verifyClass, verifyObject
22from waeup.ikoba.payments.interfaces import IPaymentsContainer
23from waeup.ikoba.payments.container import PaymentsContainer
24from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
25
26
27class PaymentsContainerTestCase(FunctionalTestCase):
28
29    layer = FunctionalLayer
30
31    def test_interfaces(self):
32        # Make sure the correct interfaces are implemented.
33        self.assertTrue(
34            verifyClass(
35                IPaymentsContainer, PaymentsContainer)
36            )
37        self.assertTrue(
38            verifyObject(
39                IPaymentsContainer, PaymentsContainer())
40            )
41        return
42
43    def test_base(self):
44        # We cannot call the fundamental methods of a base in that case
45        container = PaymentsContainer()
46        self.assertRaises(
47            NotImplementedError, container.archive)
48        self.assertRaises(
49            NotImplementedError, container.clear)
Note: See TracBrowser for help on using the repository browser.