Skip to content

Commit

Permalink
Add additonal tests (#3958)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt authored Nov 29, 2023
1 parent c22d17e commit 1ad231b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/functional/test_crt.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from contextlib import ContextDecorator

import pytest
from botocore.compat import HAS_CRT
from botocore.credentials import Credentials

Expand Down Expand Up @@ -71,9 +72,18 @@ def test_create_transfer_manager_on_optimized_instance(self):
def test_minimum_crt_version(self):
assert has_minimum_crt_version((0, 16, 12)) is True

@pytest.mark.parametrize(
"bad_version",
(
None,
"0.1.0-dev",
"0.20",
object(),
),
)
@requires_crt()
def test_minimum_crt_version_bad_crt_version(self):
def test_minimum_crt_version_bad_crt_version(self, bad_version):
with mock.patch("awscrt.__version__") as vers:
vers.return_value = None
vers.return_value = bad_version

assert has_minimum_crt_version((0, 16, 12)) is False

0 comments on commit 1ad231b

Please sign in to comment.