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.
Test Failed
Push — master ( e3a209...bb2a36 )
by Juan Jose
01:39
created

Route4MeGPSTests   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 39
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A test_set() 0 19 1
A test_param_dict_validation() 0 4 1
A test_set_valid_device_timestamp() 0 9 1
1
import unittest
2
3
from route4me.exceptions import ParamValueException
4
from route4me.constants import FORMAT, DEVICE_TYPE
5
6
from tests.base import Route4MeAPITestSuite
7
8
9
class Route4MeGPSTests(Route4MeAPITestSuite):
10
    """
11
    Route4Me Optimization Tests
12
    """
13
14
    def test_set(self):
15
        """
16
        Test Set GPS
17
        :return:
18
        """
19
        setGPS = self.route4me.setGPS
20
        setGPS.params.update({
21
            'format': FORMAT.CSV,
22
            'route_id': '7420A6120C1BA7B83C512E61416AECD0',
23
            'lat': 38.141598,
24
            'lng': -85.793846,
25
            'course': 1,
26
            'speed': 120,
27
            'device_type': DEVICE_TYPE.IPHONE,
28
            'member_id': 1,
29
            'device_guid': 'qweqweqwe',
30
            'device_timestamp': '2014-06-14 17:43:35',
31
        })
32
        return self.assertTrue(setGPS.set_gps_track())
33
34
    def test_set_valid_device_timestamp(self):
35
        """
36
        Valid Timestamp
37
        :return:
38
        """
39
        setGPS = self.route4me.setGPS
40
        device_timestamp = '2014-36-99 57:83:85'
41
        return self.assertRaises(ParamValueException,
42
                                 setGPS.device_timestamp, device_timestamp)
43
44
    def test_param_dict_validation(self):
45
        gps = self.route4me.setGPS
46
        self.assertRaises(ParamValueException,
47
                                 gps.add, {'xxxx': 100})
48
49
50
if __name__ == '__main__':
51
    unittest.main()