Пример #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
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
Пример #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'
Пример #4
0
 def test_url_fallsback_to_el6(self):
     assert centos.repository_url_part(self.distro) == 'el6'
Пример #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'
Пример #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