support/testing: add new test for python-botocore

Add a rudimentary test inspired from the "Using botocore" section in
the package README ([1]).

Note that it doesn't try to use the instantiated client, as this would
require a network connection when the test runs.

[1]: https://github.com/boto/botocore

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Raphaël Mélotte 2021-10-24 20:12:16 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 169995a920
commit 9060f1a6b8
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,3 @@
import botocore.session
session = botocore.session.get_session()
client = session.create_client('ec2', region_name="us-east-1")

View File

@ -0,0 +1,12 @@
from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3Botocore(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_BOTOCORE=y
"""
sample_scripts = ["tests/package/sample_python_botocore.py"]
timeout = 10