コード例 #1
0
ファイル: test_cli.py プロジェクト: pbabinca/dockpulp
 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
コード例 #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
コード例 #3
0
ファイル: test_cli.py プロジェクト: rohanpm/dockpulp
 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
コード例 #4
0
ファイル: test_cli.py プロジェクト: vrutkovs/dockpulp
 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