예제 #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
예제 #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.')
예제 #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.')
예제 #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})
예제 #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
예제 #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})
예제 #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.")
예제 #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
예제 #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})