Exemple #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
Exemple #2
0
 def test_directories(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.directories(), list)
Exemple #3
0
 def test_list(self):
     init()
     target_directory = TargetDirectory(test_porter)
     assert isinstance(target_directory.list(), dict)
Exemple #4
0
 def test_branch(self):
     init()
     target_directory = TargetDirectory(test_porter)
     for directory in target_directory.branch():
         assert isinstance(directory, TargetDirectory)
Exemple #5
0
 def test_remove(self):
     init()
     target_directory = TargetDirectory(dir1)
     target_directory.remove()
     assert not os.path.exists(dir1)
Exemple #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)