TooMuchBeansEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A _prepare() 0 4 2
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