diff --git a/telegram_downloader_bot/security.py b/telegram_downloader_bot/security.py index 1ff11b0..06f5371 100644 --- a/telegram_downloader_bot/security.py +++ b/telegram_downloader_bot/security.py @@ -14,7 +14,8 @@ def protected(func): async def wrapper(client, message): if int(message.from_user.id) not in allowed_ids: log.warning( - f"User with ID {message.from_user.id} attempted to text this bot!") + f"User with ID {message.from_user.id} attempted" + "to text this bot!") log.info( f"Only users allowed are: {' '.join(allowed_ids)}") return await message.reply_text("You are not on the list!") diff --git a/tests/test_utils.py b/tests/test_utils.py index 6327daa..e2278d7 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -293,7 +293,7 @@ class TestDownloadTTVideo(unittest.TestCase): def test_download_tt_video_with_valid_video(self, mock_datetime, mock_snaptik): # Mock datetime mock_now = datetime(2023, 1, 1, 12, 0, 0) - mock_datetime.datetime.now.return_value = mock_now + mock_datetime.now.return_value = mock_now # Read the content of valid.mp4 with open(self.valid_video_path, 'rb') as f: @@ -322,7 +322,7 @@ class TestDownloadTTVideo(unittest.TestCase): def test_download_tt_video_with_invalid_video(self, mock_datetime, mock_snaptik): # Mock datetime mock_now = datetime(2023, 1, 1, 12, 0, 0) - mock_datetime.datetime.now.return_value = mock_now + mock_datetime.now.return_value = mock_now # Read the content of invalid.mp4 with open(self.invalid_video_path, 'rb') as f: