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

TestBonusSharesCase00   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
dl 0
loc 6
rs 10
1
"""Tests for BonusShares events."""
2
3
from __future__ import absolute_import
4
5
from fixtures.events import EVENT6, EVENT7, EVENT8
6
from fixtures.logtest import LogTest
7
from fixtures.accumulator_states import (
8
    INITIAL_STATE0, EXPECTED_STATE0, EXPECTED_STATE21,
9
    EXPECTED_STATE22
10
)
11
12
13
class TestBonusSharesCase00(LogTest):
14
    """Test a bonus shares event with factor 1."""
15
16
    initial_state = INITIAL_STATE0
17
    occurrences = [EVENT6]
18
    expected_state = EXPECTED_STATE0
19
20
21
class TestBonusSharesCase01(LogTest):
22
    """Test a bonus shares event with factor 2."""
23
24
    initial_state = INITIAL_STATE0
25
    occurrences = [EVENT8]
26
    expected_state = EXPECTED_STATE21
27
28
29
class TestBonusSharesCase02(LogTest):
30
    """Test a bonus shares event with factor 0.5."""
31
32
    initial_state = INITIAL_STATE0
33
    occurrences = [EVENT7]
34
    expected_state = EXPECTED_STATE22
35