def test_remove_by_mask(self, glob_mock, remove_mock): mask = '/tmp/test/*.yaml' utils.remove_by_mask(mask) glob_mock.assert_called_once_with(mask) self.assertEqual( remove_mock.call_args_list, [mock.call('file1'), mock.call('file2')])
def clean(self): utils.remove(self.build_dir) utils.create_dir(self.build_dir) utils.remove_by_mask(self.result_package_mask)