GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 2981a5...fe5151 )
by Jason
7s
created

GetOrderDetailsForNotifyEventsTestCase.setUp()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 4
rs 10
1
from mock import Mock
2
3
from kakaravaara.tests import KakaravaaraTestsBase
4
from reservations.notify_events import get_order_details
5
6
7
class LinesMock(Mock):
8
    def filter(self, type=None):
1 ignored issue
show
Bug Best Practice introduced by
This seems to re-define the built-in type.

It is generally discouraged to redefine built-ins as this makes code very hard to read.

Loading history...
9
        return [Mock(
10
            text="Cool cottage",
11
            product=Mock(
12
                type=Mock(
13
                    identifier="reservable"
14
                )
15
            ),
16
            extra_data={
17
                "reservation_start": "2016-01-01",
18
                "persons": 3,
19
            },
20
            quantity=4,
21
        )]
22
23
24
class GetOrderDetailsForNotifyEventsTestCase(KakaravaaraTestsBase):
25
    def setUp(self):
26
        super(GetOrderDetailsForNotifyEventsTestCase, self).setUp()
27
        self.order = Mock(
28
            lines=LinesMock()
29
        )
30
31
    def test_correct_string_is_returned(self):
32
        self.assertEqual(
1 ignored issue
show
Bug introduced by
The Instance of GetOrderDetailsForNotifyEventsTestCase does not seem to have a member named assertEqual.

This check looks for calls to members that are non-existent. These calls will fail.

The member could have been renamed or removed.

Loading history...
33
            get_order_details(self.order),
34
            "Cool cottage\n"
35
            "    4 nights, 3 persons, 2016-01-01 - 2016-01-05"
36
        )
37