Revision daa780fa snf-astakos-app/astakos/quotaholder_app/tests.py

b/snf-astakos-app/astakos/quotaholder_app/tests.py
41 41
    NoQuantityError,
42 42
    NoCapacityError,
43 43
    NoHoldingError,
44
    DuplicateError)
44
)
45 45

  
46 46

  
47 47
class QuotaholderTest(TestCase):
......
139 139
        self.assertEqual(provision['resource'], resource1)
140 140
        self.assertEqual(provision['quantity'], 1)
141 141

  
142
        with assertRaises(DuplicateError) as cm:
143
            self.issue_commission([((holder, source, resource1), 1),
144
                                   ((holder, source, resource1), 2)])
145

  
146
        e = cm.exception
147
        provision = e.data['provision']
148
        self.assertEqual(provision['holder'], holder)
149
        self.assertEqual(provision['source'], source)
150
        self.assertEqual(provision['resource'], resource1)
151
        self.assertEqual(provision['quantity'], 2)
152

  
153 142
        r = qh.get_quota(holders=[holder])
154 143
        quotas = {(holder, source, resource1): (limit1, 0, limit1/2),
155 144
                  (holder, source, resource2): (limit2, 0, limit2),

Also available in: Unified diff