Exemplo n.º 1
0
    def test_package_corrupt(self):
        "Tests the test_package function fails with a corrupt file"

        self.setup_err()

        name = "tests/resources/corrupt.xpi"
        result = submain.test_package(self.err, name, name)

        self.assert_failed(with_errors=True, with_warnings=True)
Exemplo n.º 2
0
    def test_package_corrupt(self):
        "Tests the test_package function fails with a non-zip"

        self.setup_err()

        name = "tests/resources/junk.xpi"
        with open(name) as pack:
            result = submain.test_package(self.err, pack, name)

        self.assert_failed()
Exemplo n.º 3
0
    def test_package_pass(self):
        "Tests the test_package function with simple data"

        self.setup_err()

        name = "tests/resources/submain/install_rdf.xpi"
        with open(name) as pack:
            result = submain.test_package(self.err, pack, name)

        self.assert_silent()
        eq_(result, "success")