diff options
Diffstat (limited to 'tests/test_uritemplate.py')
-rw-r--r-- | tests/test_uritemplate.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_uritemplate.py b/tests/test_uritemplate.py index 9977ef7..f67ad26 100644 --- a/tests/test_uritemplate.py +++ b/tests/test_uritemplate.py @@ -470,12 +470,24 @@ class TestURITemplate(RFCTemplateExamples('RFCMeta', (TestCase,), {})): 'foo', [], True, '/'), None ) self.assertEqual(t.variables[0]._label_path_expansion( + 'foo', [None], True, '/'), None + ) + self.assertEqual(t.variables[0]._label_path_expansion( + 'foo', [None, None], True, '/'), None + ) + self.assertEqual(t.variables[0]._label_path_expansion( 'foo', ['one'], True, '/'), 'one' ) self.assertEqual(t.variables[0]._label_path_expansion( 'foo', ['one', 'two'], True, '/'), 'one/two' ) self.assertEqual(t.variables[0]._label_path_expansion( + 'foo', ['one', None, 'two'], True, '/'), 'one/two' + ) + self.assertEqual(t.variables[0]._label_path_expansion( + 'foo', [''], True, '/'), '' + ) + self.assertEqual(t.variables[0]._label_path_expansion( 'foo', ['', ''], True, '/'), '/' ) |