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

TestLogEvent01   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
dl 0
loc 5
rs 10
1
"""Tests logging of Event objects."""
2
3
from __future__ import absolute_import
4
from __future__ import division
5
6
from fixtures.logtest import LogTest
7
from fixtures.events import (
8
    EVENT3, EVENT4, EVENT5,
9
)
10
from fixtures.logs import (
11
    EXPECTED_LOG17, EXPECTED_LOG18,
12
)
13
from fixtures.accumulator_states import (
14
    INITIAL_STATE0, EXPECTED_STATE0,
15
)
16
17
18
class TestLogEvent(LogTest):
19
    """Base class for accumulator event logging tests."""
20
21
    initial_state = INITIAL_STATE0
22
    occurrences = [EVENT5]
23
    expected_log = EXPECTED_LOG17
24
    expected_state = EXPECTED_STATE0
25
26
27
class TestLogEvent01(TestLogEvent):
28
    """Tests the logging of 2 Event objects."""
29
30
    occurrences = [EVENT5, EVENT3]
31
    expected_log = EXPECTED_LOG18
32
33
34
class TestLogEvent02(TestLogEvent):
35
    """Tests the logging of multiple Event objects on the same date."""
36
37
    occurrences = [EVENT5, EVENT4]
38
    expected_log = EXPECTED_LOG17
39