Exemple #1
0
 def test_bad_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({'guid': 'guid', 'version': 'bad #version'})
     msg = e.exception.messages[0]
     assert msg.startswith('Version numbers should only contain'), msg
Exemple #2
0
 def test_long_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({'guid': 'guid', 'version': '1' * 33})
     msg = e.exception.messages[0]
     eq_(msg, 'Version numbers should have fewer than 32 characters.')
Exemple #3
0
 def test_long_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({'guid': 'guid', 'version': '1' * 33})
     msg = e.exception.messages[0]
     eq_(msg, 'Version numbers should have fewer than 32 characters.')
Exemple #4
0
 def test_good_version_number(self):
     check_rdf({'guid': 'guid', 'version': '1.2a-b+32*__yeah'})
     check_rdf({'guid': 'guid', 'version': '1' * 32})
Exemple #5
0
 def test_bad_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({'guid': 'guid', 'version': 'bad #version'})
     msg = e.exception.messages[0]
     assert msg.startswith('Version numbers should only contain'), msg
Exemple #6
0
 def test_good_version_number(self):
     check_rdf({'guid': 'guid', 'version': '1.2a-b+32*__yeah'})
     check_rdf({'guid': 'guid', 'version': '1' * 32})
Exemple #7
0
 def test_long_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({"guid": "guid", "version": "1" * 33})
     msg = e.exception.messages[0]
     eq_(msg, "Version numbers should have fewer than 32 characters.")
Exemple #8
0
 def test_bad_version_number(self):
     with self.assertRaises(forms.ValidationError) as e:
         check_rdf({"guid": "guid", "version": "bad #version"})
     msg = e.exception.messages[0]
     assert msg.startswith("Version numbers should only contain"), msg
Exemple #9
0
 def test_good_version_number(self):
     check_rdf({"guid": "guid", "version": "1.2a-b+32*__yeah"})
     check_rdf({"guid": "guid", "version": "1" * 32})