Python Code Challenge

231 - Write a function to test if a given string is a valid phone number and write test cases for it.