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

Test Twilio Phone Verfication Database Insertion #16

Merged
merged 7 commits into from Mar 2, 2021

Conversation

donald-mate
Copy link
Collaborator

This creates a test to ensure a mock JSON Twilio response can be saved as a valid PhoneNumberVerification entry. A second test was added that checks the input of the mock Twilio response to what is saved in the database.

…t creates a valid PhoneNumberVerification. The second checks the input against what gets placed into the database
… Added method to the PhoneNumberVerification class in models.py which takes in json input
Copy link
Collaborator

@gregziegan gregziegan left a comment

Choose a reason for hiding this comment

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

Hey, a couple suggestions before merging but it looks good! Very close

app/models.py Outdated Show resolved Hide resolved
tests/test_mock_twilio.py Outdated Show resolved Hide resolved
tests/test_mock_twilio.py Show resolved Hide resolved
donald-mate and others added 3 commits March 1, 2021 13:16
… with null carrier and the other has a null caller_name with a carrier. PhoneNumberVerification was given extra logic to account for when caller_name or carrier may be null. test_mock_twilio.py was goes through both of the mock json responses and adds them to the db
…ived within the carrier object. Added logic to account for if carrier is null. Adjusted repr to show phone_type instead of carrier_type. Adjusted tests to account for full carrier object.
@gregziegan gregziegan changed the title Dmate/mock response Test Twilio Phone Verfication Database Insertion Mar 2, 2021
@gregziegan
Copy link
Collaborator

This will resolve #5

@gregziegan gregziegan merged commit aa62c28 into main Mar 2, 2021
@gregziegan gregziegan deleted the dmate/mock-response branch March 2, 2021 04: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.

None yet

2 participants