Skip to content

Conversation

Bibo-Joshi
Copy link
Member

Based on zizmor findigs

@Bibo-Joshi Bibo-Joshi added ⚙️ security affected functionality: security 🔗 github-actions related technology: github-actions ⚙️ ci-cid affected functionality: ci-cid labels Feb 2, 2025
Copy link

codecov bot commented Feb 2, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
6592 1 6591 531
View the top 1 failed tests by shortest run time
tests.test_bot.TestBotWithRequest::test_send_close_date_default_tz[UTC-ZoneInfo]
Stack Traces | 5.21s run time
self = <tests.test_bot.TestBotWithRequest object at 0x00000257AEFC7F50>
tz_bot = PytestExtBot[token=5737018356:AAH138SuiKQF0LDCWsfgWeXfjJ5d63kCWLA]
super_group_id = '-1001842439641'

    async def test_send_close_date_default_tz(self, tz_bot, super_group_id):
        question = "Is this a test?"
        answers = ["Yes", "No", "Maybe"]
        reply_markup = InlineKeyboardMarkup.from_button(
            InlineKeyboardButton(text="text", callback_data="data")
        )
    
        aware_close_date = dtm.datetime.now(tz=tz_bot.defaults.tzinfo) + dtm.timedelta(seconds=5)
        close_date = aware_close_date.replace(tzinfo=None)
    
        msg = await tz_bot.send_poll(  # The timezone returned from this is always converted to UTC
            chat_id=super_group_id,
            question=question,
            options=answers,
            close_date=close_date,
            read_timeout=60,
        )
        msg.poll._unfreeze()
        # Sometimes there can be a few seconds delay, so don't let the test fail due to that-
>       msg.poll.close_date = msg.poll.close_date.astimezone(aware_close_date.tzinfo)
E       AttributeError: 'NoneType' object has no attribute 'astimezone'

tests\test_bot.py:2843: AttributeError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@Bibo-Joshi Bibo-Joshi merged commit dfb0ae3 into master Feb 2, 2025
26 of 27 checks passed
@Bibo-Joshi Bibo-Joshi deleted the actions-security branch February 2, 2025 09:24
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ ci-cid affected functionality: ci-cid 🔗 github-actions related technology: github-actions ⚙️ security affected functionality: security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant