コード例 #1
0
ファイル: release_copr_tests.py プロジェクト: enaut/tito
 def test_with_remote_defined_in_user_conf(self):
     self.releaser_config.remove_option("test", "remote_location")
     user_config = {'COPR_REMOTE_LOCATION': 'http://example.com/~otheruser/'}
     releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/',
         self.config, user_config, 'test', self.releaser_config, False,
         False, False, **{'offline': True})
     releaser.release(dry_run=True)
     self.assertTrue(releaser.srpm_submitted is not None)
コード例 #2
0
 def test_with_remote_defined_in_user_conf(self):
     self.releaser_config.remove_option("test", "remote_location")
     user_config = {'COPR_REMOTE_LOCATION': 'http://example.com/~otheruser/'}
     releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/',
         self.config, user_config, 'test', self.releaser_config, False,
         False, False, **{'offline': True})
     releaser.release(dry_run=True)
     self.assertTrue(releaser.srpm_submitted is not None)
コード例 #3
0
ファイル: release_copr_tests.py プロジェクト: enaut/tito
    def test_no_remote_defined(self, upload, submit):
        self.releaser_config.remove_option("test", "remote_location")
        releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/',
            self.config, {}, 'test', self.releaser_config, False,
            False, False, **{'offline': True})
        releaser.release(dry_run=True)

        self.assertFalse(upload.called)
        self.assertTrue(submit.called)
コード例 #4
0
ファイル: release_copr_tests.py プロジェクト: enaut/tito
    def test_no_remote_defined(self, upload, submit):
        self.releaser_config.remove_option("test", "remote_location")
        releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/', self.config, {},
                                'test', self.releaser_config, False, False,
                                False, **{'offline': True})
        releaser.release(dry_run=True)

        self.assertFalse(upload.called)
        self.assertTrue(submit.called)
コード例 #5
0
 def test_multiple_project_names(self, run_command):
     self.releaser_config.remove_option("test", "remote_location")
     self.releaser_config.set('test', 'project_name', "%s %s" % (PKG_NAME,
         PKG_NAME))
     releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/',
         self.config, {}, 'test', self.releaser_config, False,
         False, False, **{'offline': True})
     releaser.release()
     args = mock.call('/usr/bin/copr-cli build --nowait releaseme %s' %
             releaser.builder.srpm_location)
     self.assertEquals(args, run_command.mock_calls[0])
     self.assertEquals(args, run_command.mock_calls[1])
コード例 #6
0
ファイル: release_copr_tests.py プロジェクト: dgoodwin/tito
 def test_with_releaser(self):
     releaser = CoprReleaser(
         PKG_NAME,
         None,
         "/tmp/tito/",
         self.config,
         {},
         "test",
         self.releaser_config,
         False,
         False,
         False,
         **{"offline": True}
     )
     releaser.release(dry_run=True)
     self.assertTrue(releaser.srpm_submitted is not None)
コード例 #7
0
ファイル: release_copr_tests.py プロジェクト: dgoodwin/tito
 def test_multiple_project_names(self, run_command):
     self.releaser_config.remove_option("test", "remote_location")
     self.releaser_config.set("test", "project_name", "%s %s" % (PKG_NAME, PKG_NAME))
     releaser = CoprReleaser(
         PKG_NAME,
         None,
         "/tmp/tito/",
         self.config,
         {},
         "test",
         self.releaser_config,
         False,
         False,
         False,
         **{"offline": True}
     )
     releaser.release()
     args = mock.call("/usr/bin/copr-cli build --nowait releaseme %s" % releaser.builder.srpm_location)
     self.assertEquals(args, run_command.mock_calls[0])
     self.assertEquals(args, run_command.mock_calls[1])
コード例 #8
0
ファイル: release_copr_tests.py プロジェクト: enaut/tito
 def test_with_releaser(self):
     releaser = CoprReleaser(PKG_NAME, None, '/tmp/tito/', self.config, {},
                             'test', self.releaser_config, False, False,
                             False, **{'offline': True})
     releaser.release(dry_run=True)
     self.assertTrue(releaser.srpm_submitted is not None)