Esempio n. 1
0
    def test_str(self, mocker):
        mocked_uuid = mocker.Mock()
        mocked_uuid.uuid4().hex = 'some-id'
        with mocker.mock_module.patch('telegram.utils.uuid', mocked_uuid):
            ar = AsyncResult(client=None)

        assert ar.__str__() == f'AsyncResult <some-id>'
Esempio n. 2
0
    def test_str(self):
        mocked_uuid = Mock()
        mocked_uuid.uuid4().hex = 'some-id'
        with patch('telegram.utils.uuid', mocked_uuid):
            async_result = AsyncResult(client=None)

        assert async_result.__str__() == f'AsyncResult <some-id>'