@@ -105,10 +105,10 @@ def test_authenticate_for_private_channels(self):
105
105
pusher = Pusher .from_url (u'http://foo:bar@host/apps/4' )
106
106
107
107
expected = {
108
- u'auth' : u"foo:076740bd063f0299742a73bc5aac88900e5f35cb0185a1facbf45d326b5b204b "
108
+ u'auth' : u"foo:89955e77e1b40e33df6d515a5ecbba86a01dc816a5b720da18a06fd26f7d92ff "
109
109
}
110
110
111
- self .assertEqual (pusher .authenticate (u'private-channel' , u'34523 ' ), expected )
111
+ self .assertEqual (pusher .authenticate (u'private-channel' , u'345.23 ' ), expected )
112
112
113
113
def test_authenticate_for_presence_channels (self ):
114
114
pusher = Pusher .from_url (u'http://foo:bar@host/apps/4' )
@@ -121,12 +121,12 @@ def test_authenticate_for_presence_channels(self):
121
121
}
122
122
123
123
expected = {
124
- u'auth' : u"foo:fbbc6d8acc85fc807bba060e2df45aba33deb8ad44cbee1633675b3ce73f4817 " ,
124
+ u'auth' : u"foo:e80ba6439492c2113022c39297a87a948de14061cc67b5788e045645a68b8ccd " ,
125
125
u'channel_data' : u"{\" user_id\" :\" fred\" ,\" user_info\" :{\" key\" :\" value\" }}"
126
126
}
127
127
128
128
with mock .patch ('json.dumps' , return_value = expected [u'channel_data' ]) as dumps_mock :
129
- actual = pusher .authenticate (u'presence-channel' , u'34543245 ' , custom_data )
129
+ actual = pusher .authenticate (u'presence-channel' , u'345.43245 ' , custom_data )
130
130
131
131
self .assertEqual (actual , expected )
132
132
dumps_mock .assert_called_once_with (custom_data , cls = None )
@@ -257,9 +257,9 @@ def test_custom_json_decoder(self):
257
257
def test_custom_json_encoder (self ):
258
258
expected = {
259
259
u'channel_data' : '{"money": "1.32"}' ,
260
- u'auth' : u'key:75c6044a30f2ccd9952c48cfcf149cb0a4843bf38bab47545fb953acd62bd0c9 '
260
+ u'auth' : u'key:7f2ae5922800a20b9615543ce7c8e7d1c97115d108939410825ea690f308a05f '
261
261
}
262
- data = self .pusher .authenticate ("presence-c1" , "1" , {"money" : Decimal ("1.32" )})
262
+ data = self .pusher .authenticate ("presence-c1" , "1.1 " , {"money" : Decimal ("1.32" )})
263
263
self .assertEqual (expected , data )
264
264
265
265
if __name__ == '__main__' :
0 commit comments