Skip to content

DX-2691 Add TN Lookup Integration Tests#92

Merged
ajrice6713 merged 20 commits intofeature/openapi-generator-sdkfrom
DX-2691
Jul 18, 2022
Merged

DX-2691 Add TN Lookup Integration Tests#92
ajrice6713 merged 20 commits intofeature/openapi-generator-sdkfrom
DX-2691

Conversation

@ajrice6713
Copy link
Contributor

No description provided.

Bad lookup status response model related to the oas definition

changed the definition and regenerated the spec
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
@ajrice6713 ajrice6713 requested a review from a team July 8, 2022 19:29
@ajrice6713 ajrice6713 requested a review from DX-Bandwidth July 8, 2022 20:27
Copy link

@bpateldx bpateldx left a comment

Choose a reason for hiding this comment

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

It looks pretty good. I like additional checks being added that will help validate the API contract at somewhat deeper level. Take sometime to review the comments. We can discuss it further next week.

self.assertTrue(vzw_lookup_result.country == "US" or vzw_lookup_result.country == "Canada")
self.assertTrue(vzw_lookup_result.line_type == "Mobile" or vzw_lookup_result.line_type == "Fixed")
self.assertIn("Verizon", vzw_lookup_result.line_provider)
self.assertIs(type(vzw_lookup_result.mobile_country_code), str)
Copy link

Choose a reason for hiding this comment

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

The assertions provided by unitest library seem to be very basic ones. We can benefit from using other libraries like assertpy and pyhamcrest. Both are inspired from Java. This might make writing Tests a bit more enjoyable! Take a look and see what you think.

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 take a look - id be in favor of those or using pytest

Will have to look into how to get those into the requirements file and ensure it isnt overwritten when we re-generate (but should be doable easily)

@ajrice6713 ajrice6713 requested a review from bpateldx July 8, 2022 22:12
@ajrice6713 ajrice6713 changed the title Dx 2691 DX-2691 Add TN Lookup Integration Tests Jul 11, 2022
@ajrice6713 ajrice6713 merged commit d8109e8 into feature/openapi-generator-sdk Jul 18, 2022
@ajrice6713 ajrice6713 deleted the DX-2691 branch July 18, 2022 15:17
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.

3 participants