2 from sfa.util.misc import *
4 class TestMisc(unittest.TestCase):
9 self.assertEqual(get_leaf("foo"), "foo")
10 self.assertEqual(get_leaf("foo.bar"), "bar")
12 def testGetAuthority(self):
13 self.assertEqual(get_authority("foo"), "")
14 self.assertEqual(get_authority("foo.bar"), "foo")
15 self.assertEqual(get_authority("foo.bar.x"), "foo.bar")
17 if __name__ == "__main__":