コード例 #1
0
 def test_repository_url_part(self, distro, release, codename, output):
     fake_get_connection = self.make_fake_connection(
         (distro, release, codename))
     with patch('ceph_deploy.hosts.get_connection', fake_get_connection):
         self.module = hosts.get('testhost')
     assert centos.repository_url_part(self.module) == output
コード例 #2
0
ファイル: test_centos.py プロジェクト: angdraug/ceph-deploy
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
コード例 #3
0
ファイル: test_centos.py プロジェクト: angdraug/ceph-deploy
 def test_url_detects_rhel7(self):
     self.distro.normalized_name = 'redhat'
     self.distro.release = '7.0'
     assert centos.repository_url_part(self.distro) == 'rhel7'
コード例 #4
0
ファイル: test_centos.py プロジェクト: angdraug/ceph-deploy
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
コード例 #5
0
ファイル: test_centos.py プロジェクト: angdraug/ceph-deploy
 def test_url_detects_rhel7(self):
     self.distro.normalized_name = 'redhat'
     self.distro.release = '7.0'
     assert centos.repository_url_part(self.distro) == 'rhel7'
コード例 #6
0
ファイル: test_centos.py プロジェクト: hit1943/ceph-deploy
 def test_repository_url_part(self, distro, release, codename, output):
     fake_get_connection = self.make_fake_connection((distro, release, codename))
     with patch('ceph_deploy.hosts.get_connection', fake_get_connection):
         self.module = hosts.get('testhost')
     assert centos.repository_url_part(self.module) == output