forked from openSUSE/openSUSE-release-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devel_project_tests.py
35 lines (28 loc) · 1.19 KB
/
devel_project_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from . import OBSLocal
class TestDevelProject(OBSLocal.TestCase):
script = './devel-project.py'
script_debug_osc = False
def setUp(self):
super().setUp()
self.wf = OBSLocal.FactoryWorkflow()
spa = self.wf.create_project('server:php:applications')
OBSLocal.Package('drush', project=spa)
OBSLocal.Package('drush', self.wf.projects['target'], devel_project='server:php:applications')
staging = self.wf.create_project('openSUSE:Factory:Staging', maintainer={'users': ['staging-bot']})
OBSLocal.Package('dashboard', project=staging)
self.wf.api.pseudometa_file_ensure('devel_projects', 'server:php:applications')
def tearDown(self):
super().tearDown()
self.osc_user('Admin')
del self.wf
def test_list(self):
self.osc_user('staging-bot')
self.execute_script(['list', '--write'])
self.assertOutput('server:php:applications')
# TODO Assert --write worked and in file.
def test_reviews(self):
self.osc_user('staging-bot')
self.execute_script(['reviews'])
def test_requests(self):
self.osc_user('staging-bot')
self.execute_script(['requests'])