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