Exemplo n.º 1
0
 def test_move_to(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.move_to(dir2)
     assert not os.path.exists(dir1)
     assert os.path.exists(dir2_dir1)
     assert target_directory.src == dir2_dir1
Exemplo n.º 2
0
 def test_directories(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.directories(), list)
Exemplo n.º 3
0
 def test_list(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.list(), dict)
Exemplo n.º 4
0
 def test_branch(self):
     init()
     target_directory = TargetDirectory(test_porter)
     for directory in target_directory.branch():
         assert isinstance(directory, TargetDirectory)
Exemplo n.º 5
0
 def test_remove(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.remove()
     assert not os.path.exists(dir1)
Exemplo n.º 6
0
 def test_empty(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.empty()
     assert os.path.exists(dir1)
     assert not os.path.exists(dir1_f1)