def test_check_phone_not_ok(self): phone = ' (48)asd 99132-7087' try: phone = SFNL.check_phone(phone) raise AssertionError() except Exception as invalid: print(invalid) phone = '+(48)132-7087' try: phone = SFNL.check_phone(phone) raise AssertionError() except Exception as invalid: print(invalid) phone = ' (48)132-7087' try: phone = SFNL.check_phone(phone) raise AssertionError() except Exception as invalid: print(invalid) phone = ' (48)99132+7087' try: phone = SFNL.check_phone(phone) raise AssertionError() except Exception as invalid: print(invalid)
def test_check_phone_ok(self): phone = ' (48) 99132-7087' phone = SFNL.check_phone(phone) assert (phone == '48991327087') phone = '048991327087' phone = SFNL.check_phone(phone) assert (phone == '048991327087') phone = '+5548991327087' phone = SFNL.check_phone(phone) assert (phone == '005548991327087') phone = ' +55 (48) 99132-7087 ' phone = SFNL.check_phone(phone) assert (phone == '005548991327087')