-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.11.1: pytest fails #750
Labels
type: twilio enhancement
feature request on Twilio's roadmap
Comments
kloczek
changed the title
8.11.1: pytest fails because missing
8.11.1: pytest fails
Jan 14, 2024
twilio.rest.autopilot.AutopilotBase
After add tests/cluster/test_webhook.py and twilio/rest/events/v1/sink/sink_test.py to --ignore list+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --ignore tests/cluster/test_webhook.py --ignore twilio/rest/events/v1/sink/sink_test.py
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.4, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/twilio-python-8.11.1
collected 537 items
tests/cluster/test_cluster.py FFFFFFF [ 1%]
tests/unit/test_request_validator.py .......... [ 3%]
tests/unit/base/test_deprecation.py .. [ 3%]
tests/unit/base/test_deserialize.py .................... [ 7%]
tests/unit/base/test_serialize.py .................... [ 10%]
tests/unit/base/test_version.py .... [ 11%]
tests/unit/http/test_async_http_client.py ....... [ 13%]
tests/unit/http/test_http_client.py .............. [ 15%]
tests/unit/http/test_validation_client.py .......... [ 17%]
tests/unit/jwt/test_access_token.py .................. [ 20%]
tests/unit/jwt/test_client.py ............ [ 23%]
tests/unit/jwt/test_client_validation.py .......... [ 24%]
tests/unit/jwt/test_jwt.py .................... [ 28%]
tests/unit/jwt/test_task_router.py ..................... [ 32%]
tests/unit/rest/test_client.py .............. [ 35%]
tests/unit/twiml/test_messaging_response.py ............................................................................ [ 49%]
tests/unit/twiml/test_voice_response.py ............................................................................................................................................. [ 75%]
................................................................................................................................... [100%]
========================================================================================= FAILURES ==========================================================================================
_________________________________________________________ ClusterTest.test_allow_special_characters_for_friendly_and_identity_name __________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_allow_special_characters_for_friendly_and_identity_name>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...T': 'tests/cluster/test_cluster.py::ClusterTest::test_allow_special_characters_for_friendly_and_identity_name (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
___________________________________________________________________________ ClusterTest.test_calling_twiml_object ___________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_calling_twiml_object>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...sr/bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_calling_twiml_object (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
___________________________________________________________________________ ClusterTest.test_calling_twiml_string ___________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_calling_twiml_string>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...sr/bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_calling_twiml_string (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
_________________________________________________________________________ ClusterTest.test_list_an_incoming_number __________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_list_an_incoming_number>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_list_an_incoming_number (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
__________________________________________________________________________ ClusterTest.test_list_available_numbers __________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_list_available_numbers>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86.../bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_list_available_numbers (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
__________________________________________________________________________ ClusterTest.test_list_incoming_numbers ___________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_list_incoming_numbers>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...r/bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_list_incoming_numbers (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
____________________________________________________________________________ ClusterTest.test_send_text_message _____________________________________________________________________________
self = <test_cluster.ClusterTest testMethod=test_send_text_message>
def setUp(self):
> self.from_number = os.environ["TWILIO_FROM_NUMBER"]
tests/cluster/test_cluster.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({'PDM_BUILD_SCM_VERSION': '8.11.1', 'PATH': '/home/tkloczko/rpmbuild/BUILDROOT/python-twilio-8.11.1-2.fc35.x86...'/usr/bin/pytest', 'PYTEST_CURRENT_TEST': 'tests/cluster/test_cluster.py::ClusterTest::test_send_text_message (call)'})
key = 'TWILIO_FROM_NUMBER'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'TWILIO_FROM_NUMBER'
/usr/lib64/python3.8/os.py:675: KeyError
===================================================================================== warnings summary ======================================================================================
tests/unit/base/test_version.py:7
/home/tkloczko/rpmbuild/BUILD/twilio-python-8.11.1/tests/unit/base/test_version.py:7: PytestCollectionWarning: cannot collect test class 'TestPage' because it has a __init__ constructor (from: tests/unit/base/test_version.py)
class TestPage(Page):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
FAILED tests/cluster/test_cluster.py::ClusterTest::test_allow_special_characters_for_friendly_and_identity_name - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_calling_twiml_object - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_calling_twiml_string - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_list_an_incoming_number - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_list_available_numbers - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_list_incoming_numbers - KeyError: 'TWILIO_FROM_NUMBER'
FAILED tests/cluster/test_cluster.py::ClusterTest::test_send_text_message - KeyError: 'TWILIO_FROM_NUMBER'
========================================================================= 7 failed, 530 passed, 1 warning in 5.00s ========================================================================== |
Looks like filtering all code over |
I've added #781 |
I think #783 addresses the same issue. Right? |
tiwarishubham635
added
the
status: waiting for feedback
waiting for feedback from the submitter
label
Apr 4, 2024
Yep 😋 |
I have added a comment, please check |
8 tasks
tiwarishubham635
added
type: twilio enhancement
feature request on Twilio's roadmap
and removed
status: waiting for feedback
waiting for feedback from the submitter
labels
Apr 22, 2024
Created an internal ticket to be prioritized. +1s will help it move up the queue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
List of installed modules in build env:
Please let me know if you need more details or want me to perform some diagnostics.
The text was updated successfully, but these errors were encountered: