Ejemplo n.º 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
Ejemplo n.º 2
0
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
Ejemplo n.º 3
0
 def test_url_detects_rhel7(self):
     self.distro.normalized_name = 'redhat'
     self.distro.release = '7.0'
     assert centos.repository_url_part(self.distro) == 'rhel7'
Ejemplo n.º 4
0
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
Ejemplo n.º 5
0
 def test_url_detects_rhel7(self):
     self.distro.normalized_name = 'redhat'
     self.distro.release = '7.0'
     assert centos.repository_url_part(self.distro) == 'rhel7'
Ejemplo n.º 6
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