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
def test_url_fallsback_to_el6(self): assert centos.repository_url_part(self.distro) == 'el6'
def test_url_detects_rhel7(self): self.distro.normalized_name = 'redhat' self.distro.release = '7.0' assert centos.repository_url_part(self.distro) == 'rhel7'
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