コード例 #1
0
 def test_get_pbuilder_dist_dep14_no_vendor(self, patch):
     branch = 'sid'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(GbpError,
                                  "DEP14 DIST: Current branch 'sid' does not match vendor/suite"):
         get_pbuilder_dist(self.options, self.repo)
コード例 #2
0
 def test_get_pbuilder_dist_dep14_too_many_slashes(self):
     branch = 'too/many/slashes'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(GbpError,
                                  "DEP14 DIST: Current branch 'too/many/slashes' does not match vendor/suite"):
         get_pbuilder_dist(self.options, self.repo)
コード例 #3
0
 def test_get_pbuilder_dist_dep14_too_many_slashes(self):
     branch = 'too/many/slashed'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(GbpError,
                                  'DEP14 DIST setup needs branch name to be vendor/suite'):
         get_pbuilder_dist(self.options, self.repo)
コード例 #4
0
 def test_get_pbuilder_dist_dep14_no_vendor(self, patch):
     branch = 'sid'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(GbpError,
                                  'DEP14 DIST setup needs branch name to be vendor/suite'):
         get_pbuilder_dist(self.options, self.repo)
コード例 #5
0
 def test_get_pbuilder_dist_dep14_too_many_slashes(self):
     branch = 'too/many/slashed'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(
             GbpError,
             'DEP14 DIST setup needs branch name to be vendor/suite'):
         get_pbuilder_dist(self.options, self.repo)
コード例 #6
0
 def test_get_pbuilder_dist_dep14_no_vendor(self, patch):
     branch = 'sid'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     with self.assertRaisesRegexp(
             GbpError,
             'DEP14 DIST setup needs branch name to be vendor/suite'):
         get_pbuilder_dist(self.options, self.repo)
コード例 #7
0
 def test_get_pbuilder_dist_dep14_vendor_sid(self, patch):
     branch = 'downstream/sid'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo),
                      'downstream_sid')
     patch.assert_called_once_with()
コード例 #8
0
 def test_get_pbuilder_dist_dep14_debian_suite(self, patch):
     branch = 'debian/squeeze-lts'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo),
                      'squeeze-lts')
     patch.assert_called_once_with()
コード例 #9
0
 def test_get_pbuilder_dist_dep14_vendor_suite(self, patch):
     branch = 'downstream/mies-lts'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo), 'downstream_mies-lts')
コード例 #10
0
 def test_get_pbuilder_dist_dep14_vendor_sid(self, patch):
     branch = 'downstream/sid'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo), 'downstream_sid')
     patch.assert_called_once_with()
コード例 #11
0
 def test_get_pbuilder_dist_dep14_debian_native(self, patch):
     self.assertEqual(get_pbuilder_dist(self.options, self.repo, True), '')
コード例 #12
0
 def test_get_pbuilder_dist_dep14_debian_suite(self, patch):
     branch = 'debian/squeeze-lts'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo), 'squeeze-lts')
     patch.assert_called_once_with()
コード例 #13
0
 def test_get_pbuilder_dist_no_dep14(self, patch):
     self.options.pbuilder_dist = 'notdep14'
     self.assertEqual(get_pbuilder_dist(self.options, self.repo),
                      self.options.pbuilder_dist)
コード例 #14
0
 def test_get_pbuilder_dist_dep14_no_vendor(self, patch):
     branch = 'wheezy'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo), 'wheezy')
     patch.assert_called_once_with()
コード例 #15
0
 def test_get_pbuilder_dist_dep14_debian_master(self, patch):
     branch = 'debian/master'
     self.repo.create_branch(branch)
     self.repo.set_branch(branch)
     self.assertEqual(get_pbuilder_dist(self.options, self.repo), '')
     patch.assert_called_once_with()