<s> from test_base_sms import TestBaseSMS <EOL> from onadata . apps . sms_support . tools import SMS_SUBMISSION_REFUSED <EOL> class TestNotAllowed ( TestBaseSMS ) : <EOL> def setUp ( self ) : <EOL> TestBaseSMS . setUp ( self ) <EOL> self . setup_form ( allow_sms = False ) <EOL> def test_refused_not_enabled ( self ) : <EOL> result = self . response_for_text ( self . username , '<STR_LIT>' ) <EOL> self . assertEqual ( result [ '<STR_LIT:code>' ] , SMS_SUBMISSION_REFUSED ) <EOL> def test_allow_sms ( self ) : <EOL> result = self . response_for_text ( self . username , <EOL> '<STR_LIT>' ) <EOL> self . assertEqual ( result [ '<STR_LIT:code>' ] , SMS_SUBMISSION_REFUSED ) <EOL> self . assertEqual ( result . get ( '<STR_LIT:id>' ) , None ) </s>
