DX-2691 Add TN Lookup Integration Tests#92
DX-2691 Add TN Lookup Integration Tests#92ajrice6713 merged 20 commits intofeature/openapi-generator-sdkfrom
Conversation
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
new requirements filename
Load secrets as envs
bpateldx
left a comment
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
Use assertAuthException to match unittest assert names
No description provided.