File tree 3 files changed +17
-20
lines changed
3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -649,7 +649,7 @@ def clear_tmp_directory(self):
649
649
pipeline Run.
650
650
"""
651
651
shutil .rmtree (self .tmp_path , ignore_errors = True )
652
- self .tmp_path .mkdir (exist_ok = True )
652
+ self .tmp_path .mkdir (parents = True , exist_ok = True )
653
653
654
654
@property
655
655
def input_sources_list (self ):
Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ def test_scanpipe_project_model_clear_tmp_directory(self):
113
113
self .assertTrue (self .project1 .tmp_path .exists ())
114
114
self .assertEqual ([], list (self .project1 .tmp_path .glob ("*" )))
115
115
116
+ self .assertTrue (self .project1 .tmp_path .exists ())
117
+ shutil .rmtree (self .project1 .work_path , ignore_errors = True )
118
+ self .assertFalse (self .project1 .tmp_path .exists ())
119
+ self .project1 .clear_tmp_directory ()
120
+ self .assertTrue (self .project1 .tmp_path .exists ())
121
+
116
122
def test_scanpipe_project_model_archive (self ):
117
123
(self .project1 .input_path / "input_file" ).touch ()
118
124
(self .project1 .codebase_path / "codebase_file" ).touch ()
Original file line number Diff line number Diff line change @@ -77,25 +77,16 @@ def test_scanpipe_views_project_list_filters(self):
77
77
"""
78
78
self .assertContains (response , is_archived_filters , html = True )
79
79
80
- pipeline_filters = """
81
- <li><a href="?pipeline=" class="dropdown-item is-active">All</a></li>
82
- <li><a href="?pipeline=docker" class="dropdown-item">docker</a></li>
83
- <li>
84
- <a href="?pipeline=docker_windows" class="dropdown-item">docker_windows</a>
85
- </li>
86
- <li>
87
- <a href="?pipeline=load_inventory" class="dropdown-item">load_inventory</a>
88
- </li>
89
- <li>
90
- <a href="?pipeline=root_filesystems" class="dropdown-item">
91
- root_filesystems
92
- </a>
93
- </li>
94
- <li>
95
- <a href="?pipeline=scan_codebase" class="dropdown-item">scan_codebase</a></li>
96
- <li><a href="?pipeline=scan_package" class="dropdown-item">scan_package</a></li>
97
- """
98
- self .assertContains (response , pipeline_filters , html = True )
80
+ pipeline_filters = [
81
+ "?pipeline=docker" ,
82
+ "?pipeline=docker_windows" ,
83
+ "?pipeline=load_inventory" ,
84
+ "?pipeline=root_filesystems" ,
85
+ "?pipeline=scan_codebase" ,
86
+ "?pipeline=scan_package" ,
87
+ ]
88
+ for pipeline_filter in pipeline_filters :
89
+ self .assertContains (response , pipeline_filter )
99
90
100
91
status_filters = """
101
92
<li><a href="?status=" class="dropdown-item is-active">All</a></li>
You can’t perform that action at this time.
0 commit comments