Esempio n. 1
0
 def test_do_associate(self, mocked_pulp, bargs):
     bargs = bargs.split(" ")
     bopts = testbOpts()
     p = testPulp()
     mocked_pulp.side_effect = [p]
     if len(bargs) != 2:
         with pytest.raises(SystemExit):
             cli.do_associate(bopts, bargs)
     else:
         assert cli.do_associate(bopts, bargs) is None
Esempio n. 2
0
 def test_do_associate(self, mocked_pulp, bargs):
     bargs = bargs.split(" ")
     bopts = testbOpts()
     p = testPulp()
     mocked_pulp.side_effect = [p]
     if len(bargs) != 2:
         with pytest.raises(SystemExit):
             cli.do_associate(bopts, bargs)
     else:
         assert cli.do_associate(bopts, bargs) is None
Esempio n. 3
0
 def test_do_associate(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) != 2:
         with pytest.raises(SystemExit):
             cli.do_associate(bopts, bargs)
     else:
         assert cli.do_associate(bopts, bargs) is None
Esempio n. 4
0
 def test_do_associate(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) != 2:
         with pytest.raises(SystemExit):
             cli.do_associate(bopts, bargs)
     else:
         assert cli.do_associate(bopts, bargs) is None