@@ -32,59 +32,59 @@ def test_push_with_attributes(self):
3232 assert self .client .last_push_content ['data' ][0 ]['n' ] == 100
3333
3434
35- def test_push_validation (self ):
36- self .assertRaises (
37- Client .KPIValidationException ,
38- lambda : self .client .push (None , None )
39- )
40-
41-
42- def test_insert_all (self ):
43- assert self .client .insert_all ([
44- {'key' : 'templj' , 'value' : 83.3 },
45- {'key' : 'templj' , 'value' : 83.3 , 'date' : "2015-01-01 09:00:00" },
46- {'key' : 'templj' , 'value' : 12.3 },
47- ]) is True
48-
49- self .assertRaises (
50- Client .KPIValidationException ,
51- lambda : self .client .insert_all ([
52- {'value' : 83.3 },
35+ def test_push_validation (self ):
36+ self .assertRaises (
37+ Client .KPIValidationException ,
38+ lambda : self .client .push (None , None )
39+ )
40+
41+
42+ def test_insert_all (self ):
43+ assert self .client .insert_all ([
44+ {'key' : 'templj' , 'value' : 83.3 },
5345 {'key' : 'templj' , 'value' : 83.3 , 'date' : "2015-01-01 09:00:00" },
5446 {'key' : 'templj' , 'value' : 12.3 },
55- ])
56- )
47+ ]) is True
48+
49+ self .assertRaises (
50+ Client .KPIValidationException ,
51+ lambda : self .client .insert_all ([
52+ {'value' : 83.3 },
53+ {'key' : 'templj' , 'value' : 83.3 , 'date' : "2015-01-01 09:00:00" },
54+ {'key' : 'templj' , 'value' : 12.3 },
55+ ])
56+ )
5757
5858
59- def test_last_push (self ):
60- self .client ._push_json = lambda data = None , path = '/' : {
61- 'err' : [],
62- 'no_err' : 0
63- }
59+ def test_last_push (self ):
60+ self .client ._push_json = lambda data = None , path = '/' : {
61+ 'err' : [],
62+ 'no_err' : 0
63+ }
6464
65- assert self .client .last_push ()['err' ] == []
65+ assert self .client .last_push ()['err' ] == []
6666
6767
68- def test_last_push_with_number (self ):
69- self .client ._push_json = lambda data = None , path = '/' : path
70- assert self .client .last_push (3 ) == '/lastpushes/3'
68+ def test_last_push_with_number (self ):
69+ self .client ._push_json = lambda data = None , path = '/' : path
70+ assert self .client .last_push (3 ) == '/lastpushes/3'
7171
7272
73- def test_short (self ):
74- Client ._push_json = mock_push_json
73+ def test_short (self ):
74+ Client ._push_json = mock_push_json
7575
76- assert push ("templj" , 22 , token = self .databox_push_token ) is True
76+ assert push ("templj" , 22 , token = self .databox_push_token ) is True
7777
78- assert insert_all ([
79- {
80- 'key' : 'templj' ,
81- 'value' : 83.3
82- },
83- ], token = self .databox_push_token ) is True
78+ assert insert_all ([
79+ {
80+ 'key' : 'templj' ,
81+ 'value' : 83.3
82+ },
83+ ], token = self .databox_push_token ) is True
8484
85- Client ._push_json = lambda data = None , path = '/' : {
86- 'err' : [],
87- 'no_err' : 0
88- }
85+ Client ._push_json = lambda data = None , path = '/' : {
86+ 'err' : [],
87+ 'no_err' : 0
88+ }
8989
90- assert last_push (token = self .databox_push_token )['err' ] == []
90+ assert last_push (token = self .databox_push_token )['err' ] == []
0 commit comments