Skip to content

Commit

Permalink
remove redundant assert calls in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgromero committed Aug 22, 2024
1 parent 22be252 commit 8e74d5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/functional/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import re

import pytest
from dateutil.tz import tzutc

import botocore.session
from botocore import UNSIGNED
Expand Down Expand Up @@ -1349,9 +1350,11 @@ def test_valid_expires_value_in_response(self):
http_stubber.add_response(headers=mock_headers)
response = s3.get_object(Bucket='mybucket', Key='mykey')
self.assertIn('Expires', response)
self.assertIsInstance(response['Expires'], datetime.datetime)
self.assertEqual(
response['Expires'],
datetime.datetime(1970, 1, 1, tzinfo=tzutc()),
)
self.assertIn('ExpiresString', response)
self.assertIsInstance(response['ExpiresString'], str)
self.assertEqual(response['ExpiresString'], expires_value)
self.assertEqual(len(http_stubber.requests), 1)

Expand All @@ -1371,7 +1374,6 @@ def test_invalid_expires_value_in_response(self):
response = s3.get_object(Bucket='mybucket', Key='mykey')
self.assertNotIn('Expires', response)
self.assertIn('ExpiresString', response)
self.assertIsInstance(response['ExpiresString'], str)
self.assertEqual(response['ExpiresString'], expires)
self.assertIn(
'Failed to parse the "Expires" member as a timestamp',
Expand Down

0 comments on commit 8e74d5b

Please sign in to comment.