-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from plivo/ppai-ppk-tests
powerpack: Fix unit tests
- Loading branch information
Showing
22 changed files
with
332 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# -*- coding: utf-8 -*- | ||
__version__ = '4.8.0' | ||
__version__ = '4.8.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/<auth_id>/Number/<your_number>/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"api_id": "612982e8-0a87-11ea-b072-0242ac110007", | ||
"country_iso2": "CA", | ||
"number": "15799140336", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/MAODZKMDFJMJU3MTEYNG/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"type": "fixed" | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/resources/fixtures/powerpackAddTollfreeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/<auth_id>/Number/<your_number>/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"api_id": "612982e8-0a87-11ea-b072-0242ac110007", | ||
"country_iso2": "CA", | ||
"number": "15799140336", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/MAODZKMDFJMJU3MTEYNG/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"type": "fixed" | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/resources/fixtures/powerpackBuyAndNumberResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/<auth_id>/Number/<your_number>/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"api_id": "612982e8-0a87-11ea-b072-0242ac110007", | ||
"country_iso2": "CA", | ||
"number": "14845071864", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/MAODZKMDFJMJU3MTEYNG/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"type": "fixed" | ||
} |
43 changes: 43 additions & 0 deletions
43
tests/resources/fixtures/powerpackCountNumbersResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/<auth_id>/Number/<your_number>/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"api_id": "612982e8-0a87-11ea-b072-0242ac110007", | ||
"country_iso2": "CA", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/MAODZKMDFJMJU3MTEYNG/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"api_id": "0dacbefa-0a87-11ea-b072-0242ac110007", | ||
"meta": { | ||
"limit": 20, | ||
"next": "", | ||
"offset": 0, | ||
"previous": "", | ||
"total_count": 6 | ||
}, | ||
"objects": [ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "US", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "{number_pool_uuid}", | ||
"type": "fixed" | ||
}, | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "US", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "{number_pool_uuid}", | ||
"type": "fixed" | ||
}, | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "CA", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "{number_pool_uuid}", | ||
"type": "fixed" | ||
} | ||
] | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/resources/fixtures/powerpackCreatePowerpackResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"api_id": "4b2c83c4-09ff-11ea-b072-0242ac110007", | ||
"application_id": "20342783288007824", | ||
"application_type": "XML", | ||
"created_on": "2019-10-09T11:10:59.666461Z", | ||
"local_connect": true, | ||
"name": "test", | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"sticky_sender": true, | ||
"uuid": "<powerpack_uuid>" | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/resources/fixtures/powerpackDeletePowerpackResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"uuid": "dfsd-fsdfsd-345dfsd-fsdfs-sdfsd", | ||
"name": "My Powerpack", | ||
"smart_sender": true, | ||
"local_connect": false, | ||
"application_type": "XML", | ||
"application_id": 123912833468, | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"created_on": "2019-07-15T12:22:00Z" | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/resources/fixtures/powerpackFindShortcodeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"api_id": "614b2776-0a88-11ea-b072-0242ac110007", | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"uuid": "dfsd-fsdfsd-345dfsd-fsdfs-sdfsd", | ||
"meta": { | ||
"limit": 20, | ||
"next": "", | ||
"offset": 0, | ||
"previous": "", | ||
"total_count": 1 | ||
}, | ||
"objects": [ | ||
{ | ||
"added_on": "2019-10-09T11:10:59.741978Z", | ||
"country_iso2": "US", | ||
"number_pool_uuid": "{number_pool_uuid}", | ||
"shortcode": "444444" | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/resources/fixtures/powerpackFindTollfreeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"api_id": "614b2776-0a88-11ea-b072-0242ac110007", | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"uuid": "dfsd-fsdfsd-345dfsd-fsdfs-sdfsd", | ||
"meta": { | ||
"limit": 20, | ||
"next": "", | ||
"offset": 0, | ||
"previous": "", | ||
"total_count": 1 | ||
}, | ||
"objects": [ | ||
{ | ||
"added_on": "2019-10-09T11:10:59.741978Z", | ||
"country_iso2": "US", | ||
"number_pool_uuid": "{number_pool_uuid}", | ||
"tollfree": "18772209942" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/resources/fixtures/powerpackGetPowerpackResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"uuid": "5ec4c8c9-cd74-42b5-9e41-0d7670d6bb46", | ||
"name": "My Powerpack", | ||
"smart_sender": true, | ||
"local_connect": false, | ||
"application_type": "XML", | ||
"application_id": 123912833468, | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"created_on": "2019-07-15T12:22:00Z" | ||
} |
38 changes: 38 additions & 0 deletions
38
tests/resources/fixtures/powerpackListNumbersResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"api_id": "0dacbefa-0a87-11ea-b072-0242ac110007", | ||
"uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/d35f2e82-d387-427f-8594-6fa07613c43a/", | ||
"meta": { | ||
"limit": 20, | ||
"next": "", | ||
"offset": 0, | ||
"previous": "", | ||
"total_count": 3 | ||
}, | ||
"objects": [ | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "US", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"type": "fixed" | ||
}, | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "US", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"type": "fixed" | ||
}, | ||
{ | ||
"account_phone_number_resource": "/v1/Account/{auth_id}/Number/{your_number}/", | ||
"added_on": "2019-10-09T11:24:35.085797Z", | ||
"country_iso2": "CA", | ||
"number": "{your_number}", | ||
"number_pool_uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"type": "fixed" | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
tests/resources/fixtures/powerpackListPowerpackResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"api_id": "e44c159e-0a02-11ea-b072-0242ac110007", | ||
"meta": { | ||
"limit": 20, | ||
"next": "/api/v1/account/xxxxxxx/Powerpack?offset=20&limit=20", | ||
"offset": 0, | ||
"total_count": 53 | ||
}, | ||
"objects": [ | ||
{ | ||
"application_id": "", | ||
"application_type": "", | ||
"created_on": "2019-10-09T11:10:59.666461Z", | ||
"local_connect": true, | ||
"name": "test", | ||
"number_pool": "/v1/Account/xxxxxxxxx/NumberPool/<number_pool_uuid>/", | ||
"sticky_sender": true, | ||
"uuid": "<powerpack_uuid>" | ||
}, | ||
{ | ||
"application_id": "", | ||
"application_type": "", | ||
"created_on": "2019-10-09T17:03:31.837944Z", | ||
"local_connect": false, | ||
"name": "p23", | ||
"number_pool": "/v1/Account/xxxxxxxx/NumberPool/<number_pool_uuid>/", | ||
"sticky_sender": false, | ||
"uuid": "<powerpack_uuid>" | ||
}, | ||
{ | ||
"application_id": "", | ||
"application_type": "", | ||
"created_on": "2019-10-09T16:54:34.0117Z", | ||
"local_connect": false, | ||
"name": "p22", | ||
"number_pool": "/v1/Account/xxxxxxxx/NumberPool/<number_pool_uuid>/", | ||
"sticky_sender": false, | ||
"uuid": "<powerpack_uuid>" | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/resources/fixtures/powerpackListShortcodeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"api_id": "614b2776-0a88-11ea-b072-0242ac110007", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/xxxxxxxxx/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"meta": { | ||
"limit": 20, | ||
"offset": 0, | ||
"next": "", | ||
"previous": "", | ||
"total_count": 1 | ||
}, | ||
"objects": [ | ||
{ | ||
"added_on": "2019-10-09T11:10:59.741978Z", | ||
"country_iso2": "US", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"shortcode": "{your_shortcode}" | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/resources/fixtures/powerpackListTollfreeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"api_id": "614b2776-0a88-11ea-b072-0242ac110007", | ||
"uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"number_pool": "/v1/Account/xxxxxxxxx/NumberPool/ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f/", | ||
"meta": { | ||
"limit": 20, | ||
"offset": 0, | ||
"next": "", | ||
"previous": "", | ||
"total_count": 1 | ||
}, | ||
"objects": [ | ||
{ | ||
"added_on": "2019-10-09T11:10:59.741978Z", | ||
"country_iso2": "US", | ||
"number_pool_uuid": "ca5fd1f2-26c0-43e9-a7e4-0dc426e9dd2f", | ||
"tollfree": "{your_tollfree}" | ||
} | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/resources/fixtures/powerpackRemoveNumberResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"name": "My Powerpack", | ||
"smart_sender": true, | ||
"local_connect": false, | ||
"application_type": "XML", | ||
"application_id": 123912833468, | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"created_on": "2019-07-15T12:22:00Z" | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/resources/fixtures/powerpackRemoveShortcodeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"name": "My Powerpack", | ||
"smart_sender": true, | ||
"local_connect": false, | ||
"application_type": "XML", | ||
"application_id": 123912833468, | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"created_on": "2019-07-15T12:22:00Z" | ||
} |
10 changes: 10 additions & 0 deletions
10
tests/resources/fixtures/powerpackRemoveTollfreeResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"name": "My Powerpack", | ||
"smart_sender": true, | ||
"local_connect": false, | ||
"application_type": "XML", | ||
"application_id": 123912833468, | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/<number_pool_uuid>/", | ||
"created_on": "2019-07-15T12:22:00Z" | ||
} |
12 changes: 12 additions & 0 deletions
12
tests/resources/fixtures/powerpackUpdatePowerpackResponse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"api_id": "4b2c83c4-09ff-11ea-b072-0242ac110007", | ||
"uuid": "d35f2e82-d387-427f-8594-6fa07613c43a", | ||
"application_id": "20342783288007824", | ||
"application_type": "XML", | ||
"created_on": "2019-10-09T11:10:59.666461Z", | ||
"local_connect": true, | ||
"name": "test", | ||
"number_pool": "/v1/Account/{auth_id}/NumberPool/d35f2e82-d387-427f-8594-6fa07613c43a/", | ||
"sticky_sender": true, | ||
"uuid": "<powerpack_uuid>" | ||
} |
Oops, something went wrong.