def test_inspect_invalid_package(self): with assertRaisesRegex(self, command.CommandException, "owner/package_name"): command.inspect(package="no_user") with assertRaisesRegex(self, command.CommandException, "owner/package_name"): command.inspect(package="a/b/c")
def test_inspect_invalid_package(self): with self.assertRaisesRegexp(command.CommandException, "owner/package_name"): command.inspect(Namespace(package="no_user")) with self.assertRaisesRegexp(command.CommandException, "owner/package_name"): command.inspect(Namespace(package="a/b/c"))
def test_inspect_missing_package(self): with assertRaisesRegex(self, command.CommandException, "not found"): command.inspect(package="owner/package")
def test_inspect_valid_package(self): mydir = os.path.dirname(__file__) build_path = os.path.join(mydir, './build_simple.yml') command.build('foo/bar', build_path) command.inspect('foo/bar')
def test_inspect_missing_package(self): with self.assertRaisesRegexp(command.CommandException, "not found"): command.inspect(Namespace(package="owner/package"))