Пример #1
0
    async def test_toke_details_from_json(self):
        token_details = await self.ably.auth.request_token()
        token_details_dict = token_details.to_dict()
        token_details_str = json.dumps(token_details_dict)

        assert token_details == TokenDetails.from_json(token_details_dict)
        assert token_details == TokenDetails.from_json(token_details_str)
Пример #2
0
    def test_toke_details_from_json(self):
        token_details = self.ably.auth.request_token()
        token_details_dict = token_details.to_dict()
        token_details_str = json.dumps(token_details_dict)

        assert token_details == TokenDetails.from_json(token_details_dict)
        assert token_details == TokenDetails.from_json(token_details_str)
Пример #3
0
    def test_toke_details_from_json(self):
        token_details = self.ably.auth.request_token()
        token_details_dict = token_details.to_dict()
        token_details_str = json.dumps(token_details_dict)

        self.assertEqual(
            token_details,
            TokenDetails.from_json(token_details_dict),
        )

        self.assertEqual(
            token_details,
            TokenDetails.from_json(token_details_str),
        )