Пример #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})