2017-05-02 18:11:40 -05:00
|
|
|
import unittest
|
|
|
|
from osclib.conf import Config
|
|
|
|
from osclib.stagingapi import StagingAPI
|
|
|
|
from osclib.unselect_command import UnselectCommand
|
2019-05-02 08:14:44 +02:00
|
|
|
from . import OBSLocal
|
2017-05-02 18:11:40 -05:00
|
|
|
|
2019-05-02 08:14:44 +02:00
|
|
|
class TestUnselect(OBSLocal.TestCase):
|
2017-05-02 18:11:40 -05:00
|
|
|
|
|
|
|
def test_cleanup_filter(self):
|
2021-08-25 12:13:56 +02:00
|
|
|
wf = OBSLocal.FactoryWorkflow()
|
2019-04-21 12:00:26 +02:00
|
|
|
UnselectCommand.config_init(wf.api)
|
2018-11-10 11:30:02 +01:00
|
|
|
UnselectCommand.cleanup_days = 1
|
2019-04-21 12:00:26 +02:00
|
|
|
obsolete = wf.api.project_status_requests('obsolete', UnselectCommand.filter_obsolete)
|
|
|
|
self.assertSequenceEqual([], obsolete)
|
|
|
|
|
2019-05-06 22:38:57 +02:00
|
|
|
# most testing for unselect happens in select_tests
|