def test_split(self): d = NamespaceDict() self.assertListEqual(["foo", "bar"], d._split("/foo/bar")) self.assertListEqual(["foo", "bar", "baz"], d._split("/foo/bar/baz/")) self.assertListEqual(["foo", "bar"], d._split("foo//bar")) self.assertListEqual([], d._split("/"))
def test_split(self): d = NamespaceDict() self.assertListEqual(['foo', 'bar'], d._split('/foo/bar')) self.assertListEqual(['foo', 'bar', 'baz'], d._split('/foo/bar/baz/')) self.assertListEqual(['foo', 'bar'], d._split('foo//bar')) self.assertListEqual([], d._split('/'))