コード例 #1
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_empty_postcode_is_invalid(self):
     with self.assertRaises(InvalidPostcodeFormatValidationError):
         validate_postcode_using_regex("")
コード例 #2
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_with_mixed_case_letters(self):
     self.assertIsNone(validate_postcode_using_regex("dn55 1PT"))
コード例 #3
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_without_space_is_invalid(self):
     with self.assertRaises(InvalidPostcodeFormatValidationError):
         validate_postcode_using_regex("SW1W0NY")
コード例 #4
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_with_lower_case_letters(self):
     self.assertIsNone(validate_postcode_using_regex("dn55 1pt"))
コード例 #5
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_with_AA99_9AA_format(self):
     self.assertIsNone(validate_postcode_using_regex("DN55 1PT"))
コード例 #6
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_with_A9_9AA_format(self):
     self.assertIsNone(validate_postcode_using_regex("M1 1AE"))
コード例 #7
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_with_AA9A_9AA_format(self):
     self.assertIsNone(validate_postcode_using_regex("EC1A 1BB"))
コード例 #8
0
ファイル: test_validators.py プロジェクト: sephioh/ukpocopy
 def test_valid_postcode_format(self):
     self.assertIsNone(validate_postcode_using_regex("BR3 4TU"))