Exemple #1
0
    def test_partial_input_goes_to_distro(self):
        # Broken input should be handled fine
        data = (
            "juju:\n"
            "  Installed: whatever\n"
            "  Candidate: whatever-else\n"
            "  Nothing interesting here:\n")

        origin, source = parse_juju_origin(data)
        self.assertEqual(origin, "distro")
        self.assertEqual(source, None)
    def test_partial_input_goes_to_distro(self):
        # Broken input should be handled fine
        data = (
            "juju:\n"
            "  Installed: whatever\n"
            "  Candidate: whatever-else\n"
            "  Nothing interesting here:\n")

        origin, source = parse_juju_origin(data)
        self.assertEqual(origin, "distro")
        self.assertEqual(source, None)
    def test_ppa_installed(self):
        data = (
            "juju:\n"
            "  Installed: 0.5+bzr356-1juju1~natty1\n"
            "  Candidate: 0.5+bzr356-1juju1~natty1\n"
            "  Version table:\n"
            "     good-magic-1.0 0\n"
            "        500 http://us.archive.ubuntu.com/ubuntu/ "
            "natty/main amd64 Packages\n"
            " *** 0.5+bzr356-1juju1~natty1 0\n"
            "        500 http://ppa.launchpad.net/juju/pkgs/ubuntu/ "
            "natty/main amd64 Packages\n"
            "        100 /var/lib/dpkg/status\n")

        origin, source = parse_juju_origin(data)
        self.assertEqual(origin, "ppa")
        self.assertEqual(source, None)
Exemple #4
0
    def test_ppa_installed(self):
        data = (
            "juju:\n"
            "  Installed: 0.5+bzr356-1juju1~natty1\n"
            "  Candidate: 0.5+bzr356-1juju1~natty1\n"
            "  Version table:\n"
            "     good-magic-1.0 0\n"
            "        500 http://us.archive.ubuntu.com/ubuntu/ "
            "natty/main amd64 Packages\n"
            " *** 0.5+bzr356-1juju1~natty1 0\n"
            "        500 http://ppa.launchpad.net/juju/pkgs/ubuntu/ "
            "natty/main amd64 Packages\n"
            "        100 /var/lib/dpkg/status\n")

        origin, source = parse_juju_origin(data)
        self.assertEqual(origin, "ppa")
        self.assertEqual(source, None)
 def test_entirely_unknown_input_goes_to_distro(self):
     data = "N: VAT GEEV?"
     origin, source = parse_juju_origin(data)
     self.assertEqual(origin, "distro")
     self.assertEqual(source, None)
 def test_juju_package_is_unknown(self):
     data = "N: Unable to locate package juju"
     origin, source = parse_juju_origin(data)
     self.assertEqual(origin, "branch")
     self.assertEqual(source, "lp:juju")
Exemple #7
0
 def test_entirely_unknown_input_goes_to_distro(self):
     data = "N: VAT GEEV?"
     origin, source = parse_juju_origin(data)
     self.assertEqual(origin, "distro")
     self.assertEqual(source, None)
Exemple #8
0
 def test_juju_package_is_unknown(self):
     data = "N: Unable to locate package juju"
     origin, source = parse_juju_origin(data)
     self.assertEqual(origin, "branch")
     self.assertEqual(source, "lp:juju")