Skip to content

Commit

Permalink
Additional tests for other number formats.
Browse files Browse the repository at this point in the history
  • Loading branch information
g1smd committed Sep 18, 2012
1 parent f5f4d4b commit 2b2f2a6
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/regressiontests/localflavor/gb/tests.py
Expand Up @@ -59,10 +59,30 @@ def test_GBPhoneNumberField(self):
'00-(44)-2030-005-555': '+44 20 3000 5555',
'(+44-203)-000-5555': '+44 20 3000 5555',
'(+44)-203-000-5555': '+44 20 3000 5555',
'011-44-203-000-5555': '+44 20 3000 5555'
'011-44-203-000-5555': '+44 20 3000 5555',
'0114 223 4567': '+44 114 223 4567',
'01145 345 567': '+44 114 534 5567',
'+44 1213 456 789': '+44 121 345 6789',
'00 44 (0) 1697 73555': '+44 16977 3555',
'011 44 11 4890 2345': '+44 114 890 2345',
'020 3000 5000': '+44 20 3000 5000',
'0121 555 7777': '+44 121 555 7777',
'01750 615777': '+44 1750 615777',
'019467 55555': '+44 19467 55555',
'01750 62555': '+44 1750 62555',
'016977 3555': '+44 16977 3555',
'0500 777888': '+44 500 777888'
}
invalid = {
'011 44 203 000 5555 5': error_format,
'+44 20 300 5555': error_format,
'025 4555 6777': error_format,
'0119 456 4567': error_format,
'0623 111 3456': error_format,
'0756 334556': error_format,
'020 5000 5000': error_format,
'0171 555 7777': error_format,
'01999 777888': error_format,
'01750 61777': error_format
}
self.assertFieldOutput(GBPhoneNumberField, valid, invalid)

0 comments on commit 2b2f2a6

Please sign in to comment.