Passed
Push — master ( 684169...29f120 )
by Rafael S.
01:50
created

TestEvent.update_accumulator()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
1
"""A set of events for the tests."""
2
3
from __future__ import absolute_import
4
5
from trade_app.trade.occurrence import Occurrence
6
7
from trade_app.events import StockSplit, BonusShares
8
from fixtures.assets import ASSET
9
10
11
class TestEvent(Occurrence):
12
    """A dummy event for the tests."""
13
14
    def update_accumulator(self, container):
15
        pass
16
17
18
EVENT3 = TestEvent(
19
    ASSET,
20
    '2015-09-25',
21
    factor=1
22
)
23
24
EVENT4 = TestEvent(
25
    ASSET,
26
    '2015-09-24',
27
    factor=1,
28
)
29
30
EVENT5 = StockSplit(
31
    asset=ASSET,
32
    date='2015-09-24',
33
    factor=2
34
)
35
36
EVENT6 = BonusShares(
37
    asset=ASSET,
38
    date='2015-09-24',
39
    factor=1
40
)
41
EVENT7 = BonusShares(
42
    asset=ASSET,
43
    date='2015-09-24',
44
    factor=0.5
45
)
46
EVENT8 = BonusShares(
47
    asset=ASSET,
48
    date='2015-09-24',
49
    factor=2
50
)
51
EVENT9 = StockSplit(
52
    asset=ASSET,
53
    date='2015-09-24',
54
    factor=0.5
55
)
56