Fix datetime in unittests
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user