Skip to content

Commit cb7db14

Browse files
Update Lookup integration tests. (#137)
* Update Lookup integration tests. * Remove unneeded line_provider values.
1 parent 33e356c commit cb7db14

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/integration/test_phone_number_lookup.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def setUp(self) -> None:
3737
self.api_instance = phone_number_lookup_api.PhoneNumberLookupApi(api_client)
3838
self.account_id = BW_ACCOUNT_ID
3939

40-
def validateResult(self, result: LookupResult, e_164_format: str, line_provider: str) -> None:
40+
def validateResult(self, result: LookupResult, e_164_format: str) -> None:
4141
"""Verify a successful phone number lookup LookupResult object
4242
4343
Args:
@@ -54,11 +54,11 @@ def validateResult(self, result: LookupResult, e_164_format: str, line_provider:
5454
assert_that(result, has_properties(
5555
'response_code', 0,
5656
'e_164_format', e_164_format,
57-
'line_provider', contains_string(line_provider),
5857
'country', is_one_of_string(["US", "Canada"]),
5958
'line_type', is_one_of_string(["Mobile", "Fixed"])
6059
)
6160
)
61+
self.assertIs(type(result.line_provider), str)
6262

6363
def pollLookupStatus(self, request_id: str) -> LookupStatus:
6464
"""Poll LookupRequest for 'COMPLETE' status
@@ -144,19 +144,19 @@ def testSuccessfulPhoneNumberLookup(self) -> None:
144144

145145
# Check the information for a Bandwidth TN
146146
bw_lookup_result: LookupResult = get_lookup_status_response.result[0]
147-
self.validateResult(bw_lookup_result, BW_NUMBER, BW_NUMBER_PROVIDER)
147+
self.validateResult(bw_lookup_result, BW_NUMBER)
148148

149149
# Check the information for a Verizon TN
150150
vzw_lookup_result = get_lookup_status_response.result[1]
151-
self.validateResult(vzw_lookup_result, VZW_NUMBER, "Verizon")
151+
self.validateResult(vzw_lookup_result, VZW_NUMBER)
152152

153153
# Check the information for an AT&T TN
154154
att_lookup_result = get_lookup_status_response.result[2]
155-
self.validateResult(att_lookup_result, ATT_NUMBER, "AT&T")
155+
self.validateResult(att_lookup_result, ATT_NUMBER)
156156

157157
# Check the information for a T-Mobile TN
158158
t_mobile_lookup_result = get_lookup_status_response.result[3]
159-
self.validateResult(t_mobile_lookup_result, T_MOBILE_NUMBER, "T-Mobile")
159+
self.validateResult(t_mobile_lookup_result, T_MOBILE_NUMBER)
160160

161161
# The only way to get a failed number is if the api call to the downstream service fails - so there is no way to force this in our testing currently
162162
# check the failed_telephone_number list

0 commit comments

Comments
 (0)