def get_side_effect(path): d = Dir(755) o = Offspring() for name in fs[path]: o[name] = object() d.offspring = o return d
class TestDir(TestCase): def setUp(self): self.dir = Dir(0755) def test_no_children_before_being_saved(self): self.assertFalse(any(self.dir.children())) def test_no_parent_before_being_saved(self): self.assertIsNone(self.dir.parent())
def setUp(self): self.dir = Dir(0755)