def test_do_ancestry(self, mocked_pulp, bargs): bargs = bargs.split(" ") bopts = testbOpts() p = testPulp() mocked_pulp.side_effect = [p] if len(bargs) != 1: with pytest.raises(SystemExit): cli.do_ancestry(bopts, bargs) else: assert cli.do_ancestry(bopts, bargs) is None
def test_do_ancestry(self, mocked_pulp, bargs): bargs = bargs.split(" ") bopts = testbOpts() p = testPulp() mocked_pulp.side_effect = [p] if len(bargs) != 1: with pytest.raises(SystemExit): cli.do_ancestry(bopts, bargs) else: assert cli.do_ancestry(bopts, bargs) is None
def test_do_ancestry(self, bargs): bargs = bargs.split(" ") bopts = testbOpts() p = testPulp() (flexmock(Pulp).new_instances(p).with_args( Pulp, env=bopts.server, config_file=bopts.config_file)) if len(bargs) != 1: with pytest.raises(SystemExit): cli.do_ancestry(bopts, bargs) else: assert cli.do_ancestry(bopts, bargs) is None
def test_do_ancestry(self, bargs): bargs = bargs.split(" ") bopts = testbOpts() p = testPulp() (flexmock(Pulp) .new_instances(p) .with_args(Pulp, env=bopts.server, config_file=bopts.config_file)) if len(bargs) != 1: with pytest.raises(SystemExit): cli.do_ancestry(bopts, bargs) else: assert cli.do_ancestry(bopts, bargs) is None