1. Sean Gillies
  2. geouri


sgillies  committed 35233d8

Check that input starts with 'geo:'

  • Participants
  • Parent commits 37ac6bf
  • Branches default

Comments (0)

Files changed (2)

File geouri/__init__.py

View file
                 self.u = float(p[2:])
 def parse(uri):
-    if not uri.startswith('geo'):
+    if not uri.startswith('geo:'):
         raise ValueError, "Not a 'geo' URI"
     return ParseResult(uri[4:])

File geouri/tests.py

View file
         self.failUnlessEqual(r.u, 10.0)
     def test_scheme(self):
         self.assertRaises(ValueError, parse, 'http://0.0,1.0;crs=foo;u=10.0')
+    def test_scheme2(self):
+        self.assertRaises(ValueError, parse, 'geo0.0,1.0;crs=foo;u=10.0')
 class TestFrom(unittest.TestCase):
     def test_1(self):