コード例 #1
0
ファイル: test_helper.py プロジェクト: tfroehlich82/vidgear
def test_generate_auth_certificates(paths, overwrite_cert, results):
	"""
	Testing auto-Generation and auto-validation of CURVE ZMQ keys/certificates 
	"""
	try:
		if overwrite_cert: logger.warning('Overwriting ZMQ Authentication certificates over previous ones!')
		output = generate_auth_certificates(paths, overwrite = overwrite_cert)
		if paths != 'wrong_test_path':
			assert bool(output) == results
	except Exception as e:
		if paths == 'wrong_test_path':
			pass
		else:
			pytest.fail(str(e))
コード例 #2
0
ファイル: test_helper.py プロジェクト: abhiTronix/vidgear
def test_generate_auth_certificates(paths, overwrite_cert, results):
    """
    Testing auto-Generation and auto-validation of CURVE ZMQ keys/certificates
    """
    try:
        if overwrite_cert:
            logger.warning(
                "Overwriting ZMQ Authentication certificates over previous ones!"
            )
        output = generate_auth_certificates(paths,
                                            overwrite=overwrite_cert,
                                            logging=True)
        assert bool(output) == results
    except Exception as e:
        pytest.fail(str(e))