summaryrefslogtreecommitdiff
path: root/oslo_config/tests/test_types.py
diff options
context:
space:
mode:
Diffstat (limited to 'oslo_config/tests/test_types.py')
-rw-r--r--oslo_config/tests/test_types.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/oslo_config/tests/test_types.py b/oslo_config/tests/test_types.py
index e306f04..632c3d9 100644
--- a/oslo_config/tests/test_types.py
+++ b/oslo_config/tests/test_types.py
@@ -637,3 +637,15 @@ class HostnameTypeTests(TypeTestHelper, unittest.TestCase):
self.assertEqual(255, len(test_str))
self.assertInvalid(test_str)
self.assertConvertedEqual(test_str[:-2])
+
+
+class URITypeTests(TypeTestHelper, unittest.TestCase):
+ type = types.URI()
+
+ def test_uri(self):
+ self.assertConvertedValue('http://example.com', 'http://example.com')
+ self.assertInvalid('invalid') # it doesn't include a scheme
+ self.assertInvalid('http://') # it doesn't include an authority
+
+ def test_repr(self):
+ self.assertEqual('URI', repr(types.URI()))