File tree Expand file tree Collapse file tree
packages/google-cloud-pubsub Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,5 +89,5 @@ def from_api_repr(cls, api_repr):
8989 instance = cls (
9090 data = data , message_id = api_repr ['messageId' ],
9191 attributes = api_repr .get ('attributes' ))
92- instance ._service_timestamp = api_repr .get ('publishTimestamp ' )
92+ instance ._service_timestamp = api_repr .get ('publishTime ' )
9393 return instance
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ def test_from_api_repr_no_attributes(self):
9898 api_repr = {
9999 'data' : B64_DATA ,
100100 'messageId' : MESSAGE_ID ,
101- 'publishTimestamp ' : TIMESTAMP ,
101+ 'publishTime ' : TIMESTAMP ,
102102 }
103103 message = self ._getTargetClass ().from_api_repr (api_repr )
104104 self .assertEqual (message .data , DATA )
@@ -116,7 +116,7 @@ def test_from_api_repr_w_attributes(self):
116116 api_repr = {
117117 'data' : B64_DATA ,
118118 'messageId' : MESSAGE_ID ,
119- 'publishTimestamp ' : TIMESTAMP ,
119+ 'publishTime ' : TIMESTAMP ,
120120 'attributes' : ATTRS ,
121121 }
122122 message = self ._getTargetClass ().from_api_repr (api_repr )
You can’t perform that action at this time.
0 commit comments