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
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.')
def test_good_version_number(self): check_rdf({'guid': 'guid', 'version': '1.2a-b+32*__yeah'}) check_rdf({'guid': 'guid', 'version': '1' * 32})
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.")
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
def test_good_version_number(self): check_rdf({"guid": "guid", "version": "1.2a-b+32*__yeah"}) check_rdf({"guid": "guid", "version": "1" * 32})