Exemplo n.º 1
0
 def x_test_overwrite_entry(self):
     namespace = plash.namespace.Namespace()
     namespace.attach_at_path("/foo", TestObject())
     namespace.attach_at_path("/foo", TestObject())
     listing = namespace.get_root_dir().dir_list()
     self.assertEquals([entry["name"] for entry in listing],
                       ["foo"])
Exemplo n.º 2
0
 def test_multiple_entries(self):
     namespace = plash.namespace.Namespace()
     namespace.attach_at_path("/foo", TestObject())
     namespace.attach_at_path("/bar", TestObject())
     listing = namespace.get_root_dir().dir_list()
     self.assertEquals(sorted(entry["name"] for entry in listing),
                       ["bar", "foo"])
Exemplo n.º 3
0
 def test_call(self):
     namespace = plash.namespace.Namespace()
     mock_dir = MockDir()
     namespace.attach_at_path("/", mock_dir)
     namespace.get_root_dir().dir_mkdir(0777, "blargh")
     self.assertEquals(mock_dir._calls, ["blargh"])