コード例 #1
0
ファイル: test_booth.py プロジェクト: gmelikov/pcs
 def test_sanitize_peers_before_validation(self, mock_validate_peers,
                                           mock_build, mock_generate_key):
     commands.config_setup(
         env=_env_fixture("booth_name"),
         booth_configuration={},
     )
     mock_validate_peers.assert_called_once_with([], [])
コード例 #2
0
ファイル: test_booth.py プロジェクト: tomjelinek/pcs
 def test_sanitize_peers_before_validation(
     self, mock_validate_peers, mock_build, mock_generate_binary_key
 ):
     commands.config_setup(
         env=_env_fixture("booth_name"),
         booth_configuration={},
     )
     mock_validate_peers.assert_called_once_with([], [])
     mock_generate_binary_key.assert_called_once_with(random_bytes_count=64)
コード例 #3
0
ファイル: test_booth.py プロジェクト: HideoYamauchi/pcs
 def test_successfuly_build_and_write_to_std_path(
     self, mock_validate_peers, mock_build, mock_generate_key
 ):
     env = mock.MagicMock()
     commands.config_setup(
         env,
         booth_configuration=[
             {"key": "site", "value": "1.1.1.1", "details": []},
             {"key": "arbitrator", "value": "2.2.2.2", "details": []},
         ],
     )
     env.booth.create_config.assert_called_once_with(
         "config content",
         False
     )
     env.booth.create_key.assert_called_once_with(
         "key value",
         False
     )
     mock_validate_peers.assert_called_once_with(
         ["1.1.1.1"], ["2.2.2.2"]
     )
コード例 #4
0
ファイル: test_booth.py プロジェクト: BankaiNoJutsu/pcs
 def test_successfuly_build_and_write_to_std_path(
     self, mock_validate_peers, mock_build, mock_generate_key
 ):
     env = mock.MagicMock()
     commands.config_setup(
         env,
         booth_configuration=[
             {"key": "site", "value": "1.1.1.1", "details": []},
             {"key": "arbitrator", "value": "2.2.2.2", "details": []},
         ],
     )
     env.booth.create_config.assert_called_once_with(
         "config content",
         False
     )
     env.booth.create_key.assert_called_once_with(
         "key value",
         False
     )
     mock_validate_peers.assert_called_once_with(
         ["1.1.1.1"], ["2.2.2.2"]
     )
コード例 #5
0
ファイル: test_booth.py プロジェクト: wuyeliang/pcs
 def test_successfuly_build_and_write_to_std_path(
     self, mock_validate_peers, mock_build, mock_generate_binary_key
 ):
     env = _env_fixture("booth_name")
     commands.config_setup(
         env,
         booth_configuration=[
             {"key": "site", "value": "1.1.1.1", "details": []},
             {"key": "arbitrator", "value": "2.2.2.2", "details": []},
         ],
     )
     env.booth.create_config.assert_called_once_with(
         "config content",
         False
     )
     env.booth.create_key.assert_called_once_with(
         b"key value",
         False
     )
     mock_validate_peers.assert_called_once_with(
         ["1.1.1.1"], ["2.2.2.2"]
     )
     mock_generate_binary_key.assert_called_once_with(random_bytes_count=64)
コード例 #6
0
ファイル: test_booth.py プロジェクト: HideoYamauchi/pcs
 def test_sanitize_peers_before_validation(
     self, mock_validate_peers, mock_build, mock_generate_key
 ):
     commands.config_setup(env=mock.MagicMock(), booth_configuration={})
     mock_validate_peers.assert_called_once_with([], [])
コード例 #7
0
ファイル: test_booth.py プロジェクト: cwjenkins/pcs
 def test_sanitize_peers_before_validation(self, mock_validate_peers,
                                           mock_build, mock_generate_key):
     commands.config_setup(env=mock.MagicMock(), booth_configuration={})
     mock_validate_peers.assert_called_once_with([], [])