コード例 #1
0
    def test_get_release_index_flat(self):
        """
        Get release index file contents, flat.

        :return:
        """
        repo = DpkgRepo("http://dummy/url")
        assert repo.get_release_index() == "Plasma conduit overflow"
        assert repo.is_flat()
コード例 #2
0
    def test_get_release_index_standard(self):
        """
        Get release index file contents, standard and skip GPG verification.

        :return:
        """
        repo = DpkgRepo("http://dummy/url", gpg_verify=False)
        with patch("spacewalk.common.repo.DpkgRepo._has_valid_gpg_signature", MagicMock()) as gpg_check:
            assert repo.get_release_index() == "Plasma conduit overflow"
            assert not repo.is_flat()
            assert not gpg_check.called