TooMuchBeansEvent._prepare()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
from synergine.core.exceptions import NotConcernedEvent
2
from tests.src.event.TestEvent import TestEvent
3
from tests.src.cst import BEANS
4
5
6
class TooMuchBeansEvent(TestEvent):
7
8
    def _prepare(self, object_id, context, parameters={}):
9
        if not context.metas.value.get(BEANS, object_id) > 10000000:
10
            raise NotConcernedEvent()
11
        return parameters
12