Esempio n. 1
0
 def test_switch_templates(self):
     expected = [
         'publish-openstack-docs-pti',
     ]
     in_tree = {
         'project': {
             'templates': [
                 'publish-openstack-sphinx-docs',
             ],
         },
     }
     changed = jobs.update_docs_job(in_tree)
     self.assertEqual(expected, in_tree['project']['templates'])
     self.assertTrue(changed)
Esempio n. 2
0
 def test_switch_jobs_with_settings(self):
     expected = [{'openstack-tox-docs': {}}]
     in_tree = {
         'project': {
             'check': {
                 'jobs': [{
                     'build-openstack-sphinx-docs': {}
                 }],
             },
         },
     }
     changed = jobs.update_docs_job(in_tree)
     self.assertEqual(expected, in_tree['project']['check']['jobs'])
     self.assertTrue(changed)
Esempio n. 3
0
 def test_no_data(self):
     expected = {'project': {}}
     in_tree = {'project': {}}
     changed = jobs.update_docs_job(in_tree)
     self.assertEqual(expected, in_tree)
     self.assertFalse(changed)