Migrate contacts/test_sms_contact.py to app object

For issue #1178

master -> Merge.
v1-train -> Test and merge.