示例#1
0
 def test_on_oserror(self, mock_rmtree):
     """Ignore if general OSError."""
     cl._delete_cache()
示例#2
0
 def test_no_permission(self, mock_rmtree):
     """Ignore if unable to delete."""
     cl._delete_cache()
示例#3
0
 def test_rm_cache(self, mock_rmtree):
     """Correct directory is removed."""
     cl._delete_cache()
     mock_rmtree.assert_called_with(self.cache_path)
示例#4
0
 def test_on_oserror(self, mock_rmtree):
     """Ignore if general OSError."""
     cl._delete_cache()
示例#5
0
 def test_no_permission(self, mock_rmtree):
     """Ignore if unable to delete."""
     cl._delete_cache()
示例#6
0
 def test_rm_cache(self, mock_rmtree):
     """Correct directory is removed."""
     cl._delete_cache()
     mock_rmtree.assert_called_with(self.cache_path)