def test__validate_pkp_negative(self): """Test _validate_pkp for negative result.""" private_key_paths = mock.Mock() private_key_paths.read_all = mock.Mock(return_value=[1, 2]) with self.assertRaises(ClickException): _validate_pkp(private_key_paths) private_key_paths.read_all.assert_called_once()
def test__validate_pkp_positive(self): """Test _validate_pkp for positive result.""" private_key_paths = mock.Mock() private_key_paths.read_all = mock.Mock(return_value=[]) _validate_pkp(private_key_paths) private_key_paths.read_all.assert_called_once()