Skip to content
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

SWI-3927 OpenAPI Generator SDK #168

Merged
merged 213 commits into from
Nov 20, 2023
Merged

SWI-3927 OpenAPI Generator SDK #168

merged 213 commits into from
Nov 20, 2023

Conversation

ajrice6713
Copy link
Contributor

No description provided.

ajrice6713 and others added 30 commits July 6, 2022 12:47
* Begin integration tests

Bad lookup status response model related to the oas definition

changed the definition and regenerated the spec

* Regenerate so that createLookupResponse returns enum for status

* Finalize Integration tests for phoneNumberLookup API

* Improve tests

Remove unused tearDown function
Add a verizon (non-bw) number
add stronger logic to test order status
add regex testing for uuid
test each lookup result field for type and data (where possible)
add tests for 401 and 403 responses

* Update test.yaml

new requirements filename

* Update test.yaml

* Update test.yaml

Load secrets as envs

* Add python 3.10 to matrix testing

* Add tests for AT&T and T-Mobile Tns

* missed env variables in new tests

* Reusable `validateResult` function

* Move the polling logic into a separate function

* Create `validateAuthException` helper function

* Missed asserting anything in testDuplicatePhoneNumberLookup

* PEP8 Formatting

* Add function docstrings

* Change validateAuthException name

Use assertAuthException to match unittest assert names

* Document function return types
* Create test_multi_factor_authentication.py

1st pass at writing integration tests

* Add docstrings and format

* Remove unused imports

* Change validateAuthException name

Use assertAuthException to match unittest assert names

* Update test.yaml

* Update test.yaml

* Update test.yaml

* Get the 401 test working

No auth header causes a 401

* Use random number generator for the verify tn request

Otherwise we hit a rate limit very quickly

* Newline for readability

* Move seed outside of class - still seeing 429 errors

* Update test/integration/test_multi_factor_authentication.py

* Add test to check that the rate limit clears after 30 seconds

Requested by MFA team

* Remove unused error models

These never get used due to the nature of the ApiException that gets raised.

Overkill to initialize these by kwarg and test

* Clean up spacing and remove test skips

* Raise existing exception instead of a new ApiException

Bump time.sleep from 30-35

* test without seeding - use systime by default

* Remove manual seed for randint

sets seed value as system time by default - this works better for multiple tests in parallel

* Document function return types
* Write Media API Integration Test

Added FIxtures

* Update test to conform to binary format definition

* PEP8 format

* Remove unused libraries

* Add Media Integration Tests

* Utilize a steps function to run tests in a specific order

https://stackoverflow.com/questions/5387299/python-unittest-testcase-execution-order/5387956#5387956

* Test Cleanup

* Update mediaId

github actions runId is not unique

* wrong env

* Address PR Comments
* Add sleep to Media Tests

* Bump time.sleep to 5

Clean up docstrings
f string formatting for exception

* Remove unneeded exception handling

* Print for logging

* More logging

* Move log statement

* Add UUID to media name

GHA uses `linux` for each ubuntu version - so the media IDs arent unique
ajrice6713 and others added 14 commits October 18, 2022 11:07
* DX-2935 Remove WebRTC

* Remove WebRTC Unit Tests & Utilities

* Revert statistics api deletion

remove sessions api
remove tests

* DRY

Added one test to TerminalVerb base class and removed redundant ones to reduce repetition per @bpateldx's recommendation

* Revert "DRY"

This reverts commit 3ba082d.
* Set pause duration to be Int

* Fix `Record.max_duration`

* Update `ring.duration` and `ring.answer_call` test

* Update int fields for `SendDtmf`

* Fix Conference

Not allowed to have nested verbs

* Set `Gather` int properties to int

* Set proper bool values for `StartRecording`

* DRY

* Fix `Ring` test
* DX-2935 Remove WebRTC

* Remove WebRTC Unit Tests & Utilities

* Revert statistics api deletion

remove sessions api
remove tests

* DRY

Added one test to TerminalVerb base class and removed redundant ones to reduce repetition per @bpateldx's recommendation

* Revert "DRY"

This reverts commit 3ba082d.

* Fix bug with xml declaration

`utf8` causes an issue with the backend - `UTF-8` is valid

Also updated the import statements so that users can declare `from bandwidth.model.bxml import Response`

* Trigger Tests

* Remove LXML dependency in `setup.py`

* Drop Support for Python 3.7

* Fix tests from merge conflicts
* Update Lookup integration tests.

* Remove unneeded line_provider values.
* Update package version in user agent

* `b1`
* DX-2933 Update PR Comment Action

* add quotes
* Sleep recording test to prevent timing failures.

* Increase sleep timing for calls.

* Add contingency retries for cleanup.
* Sleep recording test to prevent timing failures.

* Increase sleep timing for calls.

* Add contingency retries for cleanup.

* Use shared call cleanup for recordings tests.

* Combined invalid tests for recordings operations.

* Update for manteca content return type.

* Decode test ids from bytes to string.
* Update bandwidth.yml

* Regenerate with OpenAPI Generator 7.0.0

Fixed TN lookup Tests in this commit

* Remove autogenerated linter workflow

* Fix `_from` + test on Python 3.11

* more from stuff

* Update Call Cleanup

* remove type hint

* Fix Media tests

* Return asset path to original value

* Fix MFA tests

* Update test_recordings.py

* Update test_calls.py

* Update test_calls.py

* Fix messages test

* Attempt to fix some calls tests

* More calls tests updates

* Conferences test

* More error fixes

* More test fixes

* more conference fixes

* fix calls tests

* Update test_calls.py

* Update test_recordings.py

* Update test_recordings.py

* remove preload content

* please work

* Update test_recordings.py

* Update test_recordings.py

* Fix unit tests
@ajrice6713 ajrice6713 requested a review from a team as a code owner November 14, 2023 14:54
@ajrice6713 ajrice6713 requested a review from a team November 14, 2023 14:54
@ajrice6713 ajrice6713 marked this pull request as draft November 15, 2023 19:36
* SWI-2571 Add Start/Stop Transcription Verbs

* Add unit tests

* Elementree doesnt like bool values

* Fix the tests

* Add param descriptions
@ajrice6713 ajrice6713 marked this pull request as ready for review November 16, 2023 20:32
This value, including the encoding specifier, may not exceed 256 characters.
"""
self.to = to
self._from = _from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to say that out of all the verbs and all the verb attributes this is the only one prepended with an underscore. Why? If there is an actual reason then I guess my only comment would be that the comment above says:
from_ (str, optional): ... which wouldn't match

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from is a reserved word in python, so it cant be used as a property name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix the comment 😬

Co-authored-by: Julia Januchowski <55033207+juliajanu@users.noreply.github.com>
@ajrice6713 ajrice6713 requested a review from juliajanu November 17, 2023 20:57
@ajrice6713 ajrice6713 merged commit 9f833dd into main Nov 20, 2023
16 checks passed
@ajrice6713 ajrice6713 deleted the feature/openapi-generator-sdk branch November 20, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants