-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e24d36
commit a90807e
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
django_project_base/notifications/base/phone_number_parser.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
django_project_base/notifications/tests/unit/test_is_phone_number_valid.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from django.test import TestCase | ||
|
||
from django_project_base.notifications.base.phone_number_parser import PhoneNumberParser | ||
|
||
|
||
class IsPhoneNumberValidTest(TestCase): | ||
def test_is_phone_number_valid(self): | ||
self.assertFalse(PhoneNumberParser.is_allowed("0903028")) | ||
self.assertFalse(PhoneNumberParser.is_allowed("1919")) | ||
self.assertTrue(PhoneNumberParser.is_allowed("03897234")) | ||
self.assertTrue(PhoneNumberParser.is_allowed("0038631697001")) | ||
self.assertTrue(PhoneNumberParser.is_allowed("+38676234567")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters